Merge pull request #323 from sveltejs/gh-321

better error for unmatched closing tag
pull/324/head
Rich Harris 8 years ago committed by GitHub
commit 0da2a99516

@ -90,6 +90,8 @@ export default function tag ( parser ) {
// close any elements that don't have their own closing tags, e.g. <div><p></div>
while ( parent.name !== name ) {
if ( parent.type !== 'Element' ) parser.error( `</${name}> attempted to close an element that was not open`, start );
parent.end = start;
parser.stack.pop();

@ -0,0 +1,8 @@
{
"message": "</div> attempted to close an element that was not open",
"loc": {
"line": 1,
"column": 0
},
"pos": 0
}
Loading…
Cancel
Save