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?

0
Avatar
Permanently deleted user

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

-2

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
Avatar
Permanently deleted user

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

Reading your question now I am thinking of a way to define yourself those "Fixes". Is there such a way to define them?

0

请先登录再写评论。