Shorthand notation ends up in missing parameters
See original GitHub issueThe following path M11.467 3.727c.289.189.37.576.181.865l-4.25 6.5a.625.625 0 01-.943.12l-2.75-2.5a.625.625 0 01.84-.925l2.208 2.007 3.849-5.886a.625.625 0 01.865-.181z
gives a parsing error SvgPath: numbers started with '0' such as '09' are ilegal (at pos 59)
while being correctly rendered by browsers.
a.625.625 0 01.84-.925
is supposed to be parsed as a 0.625 0.625 0 0 1 0.84 -0.925
. Notice how 01.
become 0 1 0.
. Instead svgpath parses it as a 0.625 0.625 0 1.84 -0.925
, and so misses 2 params.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Shorthand properties - CSS: Cascading Style Sheets | MDN
Shorthand properties are CSS properties that let you set the values of multiple ... As missing values are replaced by their initial value, ......
Read more >25+ JavaScript Shorthand Coding Techniques - SitePoint
Become a faster developer and check out this guide to shorthand JavaScript coding techniques, with longhand versions for comparison.
Read more >shorthand-property-no-redundant-values - Stylelint
Disallow redundant values within shorthand properties. ... The fix option can automatically fix all of the problems reported by this rule.
Read more >Ruby hash equivalent of JavaScript's object initializer ES6 ...
Does Ruby have something equivalent for hashes? Clarification: Obviously this question regards the shorthand notation. I'm looking for {a,b} not {a:a, ...
Read more >Apache Velocity Engine VTL Reference
VTL Properties can be used as a shorthand notation for VTL Methods that take get and set. Either $object.getMethod() or $object.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released with fix. Let me know how is it.
Just for information, when we save with InkScape with “optimized SVG” we can find this kind of paths
m305.07 118.43a125.26 116.17 0 00-125.26 116.17 125.26 116.17 0 001.4863 17.172h247.5a125.26 116.17 0 001.5332-17.172 125.26 116.17 0 00-125.26-116.17z
where we can see00-125.26
that should be equivalent to0 0 -125.26
, and the same for001.4863
=0 0 1.4863
. So this correction was right !