Skip to content

Fix path numbers adjacent to exponents#454

Open
Sanjays2402 wants to merge 1 commit into
Kozea:mainfrom
Sanjays2402:fix/path-number-exponent
Open

Fix path numbers adjacent to exponents#454
Sanjays2402 wants to merge 1 commit into
Kozea:mainfrom
Sanjays2402:fix/path-number-exponent

Conversation

@Sanjays2402

Copy link
Copy Markdown

SVG path data can place a decimal-leading number immediately after an exponent (2e2.0 means 2e2 followed by .0). CairoSVG kept it as one token, consuming the next arc parameter and misrendering or crashing; normalization now inserts the number boundary, with a regression test comparing adjacent and whitespace-separated forms.

Fixes #421.

SVG path numbers may be adjacent when the next number starts with a decimal
point. Separate completed exponents so the following coordinate is not consumed
as part of the exponent.

Add an API regression test comparing adjacent and explicitly separated forms.

Fixes Kozea#421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SVG path parse error

1 participant