Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a regression in recent commit b8e82bc.
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:This fixes the parser so that it only includes the
+-
characters if they properly appear immediately after theeE
characters.