Skip to content

Node implementation can't handle some SVG paths #467

Closed
@hadihallak

Description

@hadihallak

Try to render this SVG to JSON using the node implementation:

<Svg width="10" height="10" viewBox="0 0 10 10">
   <Svg.Path d="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"></Svg.Path>
</Svg>

Expected behavior:
Output correct sketch SVG structure

Observed behavior:
creates broken sketch SVG structure which can't run in Sketch and as you can see in the sandbox it will create a frame with infinity properties:

Screen Shot 2020-01-16 at 8 58 13 AM

was able to track it down to the lona/svg-model package which if you pass it this SVG then it will output the SVG path with no commands but that's about as far as I was able to get since the lona/svg-model isn't public

another note is that this same SVG if you copy and paste into sketch it will not render very well in comparison to Figma or the browser

How to reproduce:
see sandbox below

Sketch version:
61.2

Please attach screenshots, a zip file of your project, and/or a link to your github project
https://codesandbox.io/s/infallible-lehmann-vplez

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions