From 2f4af9c1fd04c81b6e33912709fdf7d9ab811416 Mon Sep 17 00:00:00 2001 From: Maxim Mossienko Date: Sat, 15 Aug 2009 21:31:43 +0400 Subject: [PATCH] no html/head/body tags allowed in html --- .../codeInspection/htmlInspections/XmlWrongRootElementInspection.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xml/impl/src/com/intellij/codeInspection/htmlInspections/XmlWrongRootElementInspection.java b/xml/impl/src/com/intellij/codeInspection/htmlInspections/XmlWrongRootElementInspection.java index e6b921ef9c..4b9645df2d 100644 --- a/xml/impl/src/com/intellij/codeInspection/htmlInspections/XmlWrongRootElementInspection.java +++ b/xml/impl/src/com/intellij/codeInspection/htmlInspections/XmlWrongRootElementInspection.java @@ -91,6 +91,9 @@ public class XmlWrongRootElementInspection extends HtmlLocalInspectionTool { name = XmlUtil.findLocalNameByQualifiedName(name); if (!name.equals(text)) { + if (tag instanceof HtmlTag) { + return; // it is legal to have html / head / body omitted + } final LocalQuickFix localQuickFix = new LocalQuickFix() { @NotNull public String getName() { -- 2.11.4.GIT