fix: add namespace for svg, making output XHTML+SVG+MathML compatible (#2725)

* fix: add namespace for svg
* Remove unneeded xmlns:xlink

Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
Co-authored-by: Erik Demaine <edemaine@mit.edu>
This commit is contained in:
Future Formula
2021-07-22 00:47:49 +08:00
committed by GitHub
parent 8701b9c4e7
commit 35ff5ac223

View File

@@ -505,7 +505,7 @@ export class SvgNode implements VirtualNode {
}
toMarkup(): string {
let markup = "<svg";
let markup = `<svg xmlns="http://www.w3.org/2000/svg"`;
// Apply attributes
for (const attr in this.attributes) {