Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG 2.0 path number production only allows integers #737

Closed
dd8 opened this issue Sep 19, 2019 · 1 comment
Closed

SVG 2.0 path number production only allows integers #737

dd8 opened this issue Sep 19, 2019 · 1 comment

Comments

@dd8
Copy link

dd8 commented Sep 19, 2019

https://www.w3.org/TR/SVG2/paths.html#PathDataBNF

In SVG 1.1 number has the following production:

number:
    sign? integer-constant
    | sign? floating-point-constant

In SVG 2.0 the number production changed to:

number ::= ([0-9])+

This doesn't match some of the examples in the paragraph describing the grammar:

Similarly, for the string "M 0.6.5", the first coordinate of the "moveto" consumes the characters "0.6" and stops upon encountering the second decimal point because the production of a "coordinate" only allows one decimal point. The result is that the first coordinate will be "0.6" and the second coordinate will be ".5".

@dirkschulze
Copy link
Contributor

We updated the spec here https://svgwg.org/svg2-draft/paths.html#PathDataBNF and fixed the number issue. Thanks a lot for reporting issues that you find @dd8!

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

No branches or pull requests

2 participants