[librsvg/librsvg-2.48] Ensure that font-family="quoted with multiple spaces'" preserves the spaces



commit f87aa887bd3a26d5a0f5abd591be61359d8ef41a
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed May 27 16:51:34 2020 -0500

    Ensure that font-family="quoted  with  multiple  spaces'" preserves the spaces

 rsvg_internals/src/font_props.rs | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/rsvg_internals/src/font_props.rs b/rsvg_internals/src/font_props.rs
index a6338db5..3ae6b718 100644
--- a/rsvg_internals/src/font_props.rs
+++ b/rsvg_internals/src/font_props.rs
@@ -352,6 +352,11 @@ mod tests {
             Ok(MultiFontFamily("Hello world".to_owned()))
         );
 
+        assert_eq!(
+            <MultiFontFamily as Parse>::parse_str("\"Hello world  with  spaces\""),
+            Ok(MultiFontFamily("Hello world  with  spaces".to_owned()))
+        );
+
         assert_eq!(
             <MultiFontFamily as Parse>::parse_str("  Hello  world  "),
             Ok(MultiFontFamily("Hello world".to_owned()))
@@ -366,8 +371,8 @@ mod tests {
     #[test]
     fn parses_multiple_font_family() {
         assert_eq!(
-            <MultiFontFamily as Parse>::parse_str("serif,monospace,\"Hello world\""),
-            Ok(MultiFontFamily("serif,monospace,Hello world".to_owned()))
+            <MultiFontFamily as Parse>::parse_str("serif,monospace,\"Hello world\", with  spaces "),
+            Ok(MultiFontFamily("serif,monospace,Hello world,with spaces".to_owned()))
         );
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]