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 with default XML processing instructions #179

Open
kosaj opened this issue Sep 7, 2022 · 6 comments
Open

SVG with default XML processing instructions #179

kosaj opened this issue Sep 7, 2022 · 6 comments

Comments

@kosaj
Copy link

kosaj commented Sep 7, 2022

Ilustrator exports SVG with default XML processing instructions that will throw given error when svg is parsed.

SvgToFont:CLI:ERR: Error: Unmatched selector: ="1.0" encoding="UTF-8"?><style>.cls-1{fill:#100;}.cls-2{isolation:isolate;}</style>
at parse (\node_modules\css-what\lib\commonjs\parse.js:85:15)
at Object.select (\node_modules\cheerio-select\lib\index.js:191:68)
at LoadedCheerio.find (\node_modules\cheerio\lib\api\traversing.js:90:30)
at initialize (\node_modules\cheerio\lib\load.js:156:34)
at \node_modules\svgtofont\lib\utils.js:233:29
at Array.forEach ()
at \node_modules\svgtofont\lib\utils.js:230:37
at new Promise ()
at createSvgSymbol (\node_modules\svgtofont\lib\utils.js:229:12)
at exports.default (\node_modules\svgtofont\lib\index.js:84:43)

@jaywcjlove
Copy link
Owner

This is the case when you output a non-standard svg icon
@kosaj

@maimai123
Copy link

我也遇到了这个情况,sketch导出的svg带有的前缀, 生成symbol.svg的时候会报错

@jaywcjlove
Copy link
Owner

@maimai123 Export SVG Files using sketch's SVGO Compressor plugin.

@Grapdevs
Copy link

@maimai123 Export SVG Files using sketch's SVGO Compressor plugin.

Thnx https://github.com/svg/svgo , helped me a lot

@jaywcjlove
Copy link
Owner

@anambl
Copy link

anambl commented May 10, 2024

@jaywcjlove Would it be possible to skip the step of creating the SVG symbol? I'm having the same issue and it's just with this step, all other files are generated fine.

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