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

Support automatic SVG detection using the file data. #654

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

colinrtwhite
Copy link
Member

Adds parsing logic to SvgDecoder to automatically detect SVGs based on the contents of the Source.

This should greatly improve SVG autodetection and cover 99% of cases since the previous solution only checked the mime type. It's not possible to cover all cases without reading the whole file + a bunch of extra processing.

Should help avoid issues like: #649

@colinrtwhite colinrtwhite changed the title Support automatic SVG detection using the source contents. Support automatic SVG detection using the file data. Feb 3, 2021
Copy link
Member

@Jawnnypoo Jawnnypoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@colinrtwhite colinrtwhite merged commit 2164687 into master Feb 4, 2021
@colinrtwhite colinrtwhite deleted the colin/svg_detection branch February 4, 2021 01:38
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

Successfully merging this pull request may close these issues.

2 participants