EA-39857 Fix (empty tag passed to inspection) - [reviewed by E.Kudelevsky]

This commit is contained in:
Rustam Vishnyakov
2012-11-20 12:00:33 +04:00
parent 67c9293052
commit 0786e831ca
@@ -252,7 +252,9 @@ public class HtmlUnknownTagInspection extends HtmlLocalInspectionTool {
ProblemHighlightType highlightType = tag.getContainingFile().getContext() == null ?
ProblemHighlightType.GENERIC_ERROR_OR_WARNING :
ProblemHighlightType.INFORMATION;
holder.registerProblem(startTagName, message, highlightType, quickfixes.toArray(new LocalQuickFix[quickfixes.size()]));
if (startTagName.getTextLength() > 0) {
holder.registerProblem(startTagName, message, highlightType, quickfixes.toArray(new LocalQuickFix[quickfixes.size()]));
}
if (endTagName != null) {
holder.registerProblem(endTagName, message, highlightType, quickfixes.toArray(new LocalQuickFix[quickfixes.size()]));