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 strings starting with empty lines do not import correctly #1813

Closed
lehni opened this issue May 23, 2020 · 2 comments
Closed

SVG strings starting with empty lines do not import correctly #1813

lehni opened this issue May 23, 2020 · 2 comments
Assignees

Comments

@lehni
Copy link
Member

lehni commented May 23, 2020

While this works:

const svg = `<svg>
  <rect fill="red" width="100" height="100"/>
</svg>`
project.importSVG(svg)

This doesn't:

const svg = `
<svg>
  <rect fill="red" width="100" height="100"/>
</svg>
`
project.importSVG(svg)
@lehni lehni self-assigned this May 23, 2020
@lehni
Copy link
Member Author

lehni commented May 23, 2020

Sketch

@lehni lehni closed this as completed in 5631279 May 23, 2020
@lehni
Copy link
Member Author

lehni commented May 27, 2020

This doesn't always work, for example the following string still fails:

`
<?xml version="1.0" encoding="utf-8"?>
<!-- Some Comment  -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <rect fill="red" width="100" height="100"/>
</svg>
`

@lehni lehni reopened this May 27, 2020
@lehni lehni closed this as completed in 65cc12e May 27, 2020
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

1 participant