Skip to content

Update convert2dashes.py to allow stroke-dasharray formatting like described in SVG standard

Looking into SVG standards, dasharray allows to format the string with commas and/or whitespaces. The previous version of convert2dashes.py did not allow whitespaces.

https://www.w3.org/TR/SVG/painting.html#StrokeDashing

: Specifies a dashing pattern to use. A is a list of comma and/or white space separated lengths or percentages. Each value specifies a length along the path for which the stroke is to be painted (a dash) and not painted (a gap). The first value and every second value in the list after it specifies the length of a dash, and every other value specifies the length of a gap between the dashes. If the list has an odd number of values, then it is repeated to yield an even number of values. (Thus, the rendering behavior of stroke-dasharray: 5,3,2 is equivalent to stroke-dasharray: 5,3,2,5,3,2.)

Merge request reports