Thomas Shinnick 5abfef15e1 Handle one more valid real number format in svgLib parse_path()
Using svg.draw(pen) and parse_path() from svgLib threw exception
     ValueError: could not convert string to float: 'a'
on a SVG <path> string generated by Inkscape. Altering the path
string might object to other string bits like 'Z' or 'v', or
give even stranger exceptions.

Finally tracked it down to the path containing particular valid
numbers like "-4e-5" or "1e-4". Changing these to "-4.0e-5" or
"1.0e-4" would stop the exceptions. The parse_path() was not
accepting valid SVG real numbers.

The specification for real number formats is a bit of a mess in
CSS land right now, but the reassuringly concrete spec is:
    https://www.w3.org/TR/css-syntax-3/#number-token-diagram
which allows a real number having an exponent but without having
a fractional part, such as the number "1e3".

This change updates an RE to make fractional parts optional,
and adds a test for this valid SVG number format.
2022-05-03 17:48:14 -05:00
..
2021-03-29 11:45:58 +02:00
2022-01-04 11:44:04 +01:00
2021-03-29 11:45:58 +02:00
2022-01-31 20:56:03 +09:00
2021-03-29 11:45:58 +02:00
2022-01-19 16:40:03 +00:00
2021-03-29 11:45:58 +02:00