ligasgr / intellij-xquery

Plugin to support XQuery in Intellij Idea
Apache License 2.0
35 stars 23 forks source link

Mismatched XML tags not flagged as an error #165

Open rhdunn opened 8 years ago

rhdunn commented 8 years ago

Given:

declare function foo() {
    <foo><bar><baz></baz></baz></bar></foo>
};

The </ in </foo> gets flagged as an error, but only because the plugin is assuming the XML is not closed. For more complex XML, this would make it harder to track down where the actual error is (in this case the duplicated closing baz tag).

It would be nice to have an error message like:

    <foo><bar><baz></baz></baz></bar></foo>
                         ^^^^^^ -- error: expected closing `bar` tag, got closing `baz` tag.