[BZ#762919] Incorrect parsing of stroke-dasharray properties
Submitted by Massimo
Link to original bug (#762919)
Description
https://git.gnome.org/browse/librsvg/tree/rsvg-styles.c#n832
g_strsplit (.., ",", ..,) is used to parse dash arrays, but the spec says:
contains a list of comma and/or white space separated s and s that specify the lengths of alternating dashes and gapsSo using g_strsplit_set and passing also the white spaces as delimiters allows to render the file painting-control-02-f.svg from the svg1.1 test suite better.
https://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlSVGWeb/painting-control-02-f.html
If, while counting the #dashes:
https://git.gnome.org/browse/librsvg/tree/rsvg-styles.c#n838
the empty strings that g_strsplit_set generates when it finds multiple delimiter sequences are swapped to the end of the string array and then ignored also the file painting-stroke-09-t.svg is rendered better.
https://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlSVGWeb/painting-stroke-09-t.html