question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shorthand notation ends up in missing parameters

See original GitHub issue

The 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
puzrincommented, Jan 19, 2020

Released with fix. Let me know how is it.

0reactions
kpymcommented, Apr 30, 2020

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 see 00-125.26 that should be equivalent to 0 0 -125.26, and the same for 001.4863 = 0 0 1.4863. So this correction was right !

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found