diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-08 10:26:38 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-08 10:38:03 -0400 |
commit | 9d68eaf2d7366bc448f722d7638714fba9c34460 (patch) | |
tree | 73b3efc86e8318e1da54044fdfad377aba505ca9 /pango/pango-markup.c | |
parent | 90b289bba8492e8de2373a23e3023bba70df69bc (diff) | |
download | pango-9d68eaf2d7366bc448f722d7638714fba9c34460.tar.gz |
markup: Allow pt for rise too
Diffstat (limited to 'pango/pango-markup.c')
-rw-r--r-- | pango/pango-markup.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pango/pango-markup.c b/pango/pango-markup.c index 24de1fc6..a4bea3e5 100644 --- a/pango/pango-markup.c +++ b/pango/pango-markup.c @@ -1589,8 +1589,17 @@ span_parse_func (MarkupData *md G_GNUC_UNUSED, { gint n = 0; - if (!span_parse_int ("rise", rise, &n, line_number, error)) - goto error; + if (!parse_length (rise, &n)) + { + g_set_error (error, + G_MARKUP_ERROR, + G_MARKUP_ERROR_INVALID_CONTENT, + _("Value of 'rise' attribute on <span> tag on line %d " + "could not be parsed; should be an integer, or a " + "string such as '5.5pt', not '%s'"), + line_number, rise); + goto error; + } add_attribute (tag, pango_attr_rise_new (n)); } |