Fix SVG by moving the processing instruction to the start#106
Merged
lhecker merged 1 commit intomicrosoft:mainfrom May 20, 2025
Merged
Fix SVG by moving the processing instruction to the start#106lhecker merged 1 commit intomicrosoft:mainfrom
lhecker merged 1 commit intomicrosoft:mainfrom
Conversation
0d872da to
4c3eb96
Compare
Per the SVG 2 Conformance Criteria:
A DOM node tree or subtree rooted at a given element is a conforming SVG
DOM subtree if it forms a SVG document fragment that adheres to the
specification described in this document (Scalable Vector Graphics (SVG)
Specification). Specifically, it:
- is rooted by an ‘svg’ element in the SVG namespace,
[...]
With the extra headers, both GitHub's preview function, Firefox and
Gwenview (KDE) fails to render the vector image:
GitHub:
Error rendering embedded code
Invalid image source.
Firefox:
XML Parsing Error: XML or text declaration not at start of entity
Location: https://raw.githubusercontent.com/microsoft/edit/refs/heads/main/assets/Microsoft_logo_(1980).svg
Line Number 3, Column 1:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
^
Gwenview:
Renders an empty image.
Move the header below the <svg> element to fix the above issues.
Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
4c3eb96 to
76c1506
Compare
Contributor
Author
|
@microsoft-github-policy-service agree |
0c1f2f2 to
76c1506
Compare
This comment was marked as outdated.
This comment was marked as outdated.
lhecker
approved these changes
May 20, 2025
Member
|
Thank you for fixing this! |
diabloproject
pushed a commit
to diabloproject/edit
that referenced
this pull request
May 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(assets): remove extraneous Source: and License: elements
Per the SVG 2 Conformance Criteria:
A DOM node tree or subtree rooted at a given element is a conforming SVG
DOM subtree if it forms a SVG document fragment that adheres to the
specification described in this document (Scalable Vector Graphics (SVG)
Specification). Specifically, it:
[...]
With the extra headers, both GitHub's preview function, Firefox and
Gwenview (KDE) fails to render the vector image:
GitHub:
Error rendering embedded code
Firefox:
Gwenview:
Move the header below the element to fix the above issues.