This fixes a regression in recent commit b8e82bc8eb1ba516aed1ac3445568afed6558e45.
That commit added the characters eE+- to the list of accepted characters within the middle of a float string. However, the +- characters are only valid immediately after the eE characters. This broke SVGS that don't use whitespace between floats with negative numbers. Consider the following snippet from a real SVG:
With the commit referenced above, the string 0-.435 gets interpreted as a single float value which fails to parse as a float. I've fixed this by splitting the function to parse floats into 3 parts:
This fixes a regression in recent commit b8e82bc8eb1ba516aed1ac3445568afed6558e45.
That commit added the characters
eE+-
to the list of accepted characters within the middle of a float string. However, the+-
characters are only valid immediately after theeE
characters. This broke SVGS that don't use whitespace between floats with negative numbers. Consider the following snippet from a real SVG:With the commit referenced above, the string
0-.435
gets interpreted as a single float value which fails to parse as a float. I've fixed this by splitting the function to parse floats into 3 parts:1) before the decimal point
2) after the decimal point
3) the exponent
This fixes the parser so that it only includes the
+-
characters if they properly appear immediately after theeE
characters.