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

Fail to parser SVG Image #19

Open
denniscm opened this issue Feb 1, 2021 · 3 comments
Open

Fail to parser SVG Image #19

denniscm opened this issue Feb 1, 2021 · 3 comments

Comments

@denniscm
Copy link

denniscm commented Feb 1, 2021

Hi,

I'm getting this error when i'm trying to parse a SVG Image:

Error: Expected > (116:26). If this is valid SVG, it's probably a bug in svg-parser. Please raise an issue at https://github.com/Rich-Harris/svg-parser/issues – thanks!


    <path d="M604.9,113.3c0.
                             ^

In the SVG the line that i'm getting the error is like that:

<path d="M604.9,113.3c0.1,0,0.1,0,0.2,0c0,0,0.1,0,0.2,0v0.2h0.2c0,0,0.1,0,0.2,0v0.2h0.2c0,0,0,0.1,0,0.2v0.2c0,0-0.1,0-0.2,0    c0,0,0,0.1,0,0.2h-0.2v0.2c0,0-0.1,0-0.2,0h-0.2v-0.2c0,0-0.1,0-0.2,0c-0.1,0-0.1,0-0.2,0c0-0.1,0-0.2,0-0.4c0-0.1,0-0.2,0-0.4    c0.1,0,0.1,0,0.2,0C604.9,113.4,604.9,113.3,604.9,113.3z">
</path>

This error it's weird because it appers sometimes, but not all times that i try to parse.
Sometimes it goes on pass that point, but get another error in other line, it's a very random error, but all of them with this "path" tag.

Any tips on how to solve this?

Thank you.

@TrySound
Copy link
Collaborator

TrySound commented Feb 6, 2021

@denniscm Hi, could you post whole svg please?

@Chiradeep-Banik
Copy link

Hey I got the same error here

<svg xmlns="http://www.w3.org/2000/svg" width="35" height="30.875" viewBox="0 0 35 30.875">
     <path id="Icon_open-account-logout" data-name="Icon open-account-logout" d="M12.375,0V4.125h16.5V24.75h-16.5v4.125H33V0ZM8.25,8.25,0,14.438l8.25,6.188V16.5h16.5V12.375H8.25Z" fill="none" transform="translate(1 1)" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

This is the svg.

Any way to solve it??
Thanks

@Crisfole
Copy link

This works on a fresh install.

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

4 participants