Skip to content

Support automatic SVG detection using the file data.#654

Merged
colinrtwhite merged 1 commit into
masterfrom
colin/svg_detection
Feb 4, 2021
Merged

Support automatic SVG detection using the file data.#654
colinrtwhite merged 1 commit into
masterfrom
colin/svg_detection

Conversation

@colinrtwhite
Copy link
Copy Markdown
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
Copy Markdown
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