fix typo, disallow multiple style/script tags

pull/143/head
Rich-Harris 8 years ago
parent d3a2ff243a
commit a72955faa2

@ -88,7 +88,7 @@ export default function tag ( parser ) {
if ( name in specials ) {
const special = specials[ name ];
if ( parser[ special.id ] ) {
if ( parser[ special.property ] ) {
parser.index = start;
parser.error( `You can only have one <${name}> tag per component` );
}

@ -0,0 +1,8 @@
{
"message": "You can only have one <style> tag per component",
"loc": {
"line": 9,
"column": 0
},
"pos": 58
}

@ -0,0 +1,13 @@
<div>foo</div>
<style>
div {
color: red;
}
</style>
<style>
div {
color: blue;
}
</style>
Loading…
Cancel
Save