[librsvg/librsvg-2.48] Ensure that font-family="quoted with multiple spaces'" preserves the spaces
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.48] Ensure that font-family="quoted with multiple spaces'" preserves the spaces
- Date: Wed, 27 May 2020 23:08:20 +0000 (UTC)
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]