vscode-svgviewer
vscode-svgviewer copied to clipboard
Broken preview for SVG files missing XML namespace
Previewing some svg file results in this:
which points to /media/preview.js:16
Code version: 1.32.3, clean install, on macOS Extension version: 2.0.0 from marketplace
Seems to only happen with svg files missing xmlns="http://www.w3.org/2000/svg"
, which is not required when svg is parsed as html (https://www.w3.org/TR/SVG2/struct.html#Namespace).
(My usecase is svg files meant to be used as html template fragments, which may be outside of the scope of this extension, workaround is just adding the required attribute to all svg files)