pull/1077/merge
Emil Ajdyna 8 years ago committed by GitHub
commit 90d67e9d2e

@ -79,6 +79,17 @@ export default function validateElement(
}); });
} }
if (node.name === 'svg') {
node.attributes.forEach(attribute => {
if (attribute.name === 'viewbox') {
validator.warn(
`<svg> has an invalid viewbox attribute did you mean viewBox?`,
node.start
)
}
})
}
let hasIntro: boolean; let hasIntro: boolean;
let hasOutro: boolean; let hasOutro: boolean;
let hasTransition: boolean; let hasTransition: boolean;

@ -0,0 +1,6 @@
<svg viewbox="-250 -250 500 500">
<line x1="0" y1="0" x2="200" y2="0" stroke="black" />
<line x1="0" y1="0" x2="-200" y2="0" stroke="black" />
<line x1="0" y1="0" x2="0" y2="200" stroke="black" />
<line x1="0" y1="0" x2="0" y2="-200" stroke="black" />
</svg>

After

Width:  |  Height:  |  Size: 267 B

@ -0,0 +1,8 @@
[{
"message": "<svg> has an invalid viewbox attribute did you mean viewBox?",
"loc": {
"line": 1,
"column": 0
},
"pos": 0
}]
Loading…
Cancel
Save