Fix Closing Tag Matches Nothing

I have lots of instances of </br> in my project (instead of <br/>)
IDEA rightly highlights them and says "Closing tag matches nothing"
However, the only options to fix it are:
"Remove Extra Closing Tag" - Does what you would expect
"Merge Tags" - I don't really understand what this does

It would be nice to be offered to replace with a single tag.

Also, when I run  Analyze -Inspect code with all HTML options ticked, the "Closing tag matches nothing" warning does not appear in the results. ?:|

I was expecting in the editor a "Fix all similar errors" option (in the same way that Redundant Casts can be removed in one go)
I was also expecting in the Analyze - Inspect code results the option to fix all similar errors in all specified files.

Make sense?

3 comments
Comment actions Permalink

Use "Search | Replace..." to replace all such tags with valid ones.

-1
Comment actions Permalink

I can do a lot of Quick Fixes with Seach Replace but I don't because its easier to do it with Alt-Enter.
Its also why I use IDEA and don't use eclipse ;\

0
Comment actions Permalink

I was wondering whether anyone knows a way to automatically apply a fix to "Closing tag matches nothing" errors after Inspect Code. Just now I need to fix each one manually - Search and Replace is not the best for me because the context for the missing tags span multiple files in multiple lines.

0

Please sign in to leave a comment.