PY-13986 View -> Open In Browser unavailable for Django projects
[idea/community.git] / xml / impl / src / com / intellij / ide / browsers / impl / WebBrowserServiceImpl.java
index 3d0451d71b3d75fd71fa2be4ac796b45f88a82c0..723d64bd1193a293d756fe3a438af5db740cf260 100644 (file)
@@ -20,6 +20,7 @@ import com.intellij.ide.browsers.WebBrowserService;
 import com.intellij.ide.browsers.WebBrowserUrlProvider;
 import com.intellij.lang.Language;
 import com.intellij.lang.html.HTMLLanguage;
+import com.intellij.lang.html.HtmlCompatibleLanguage;
 import com.intellij.lang.xhtml.XHTMLLanguage;
 import com.intellij.lang.xml.XMLLanguage;
 import com.intellij.openapi.project.DumbService;
@@ -40,6 +41,9 @@ import java.util.Collections;
 public class WebBrowserServiceImpl extends WebBrowserService {
   public static boolean isHtmlOrXmlFile(@NotNull PsiElement element) {
     Language language = element.getLanguage();
+    if (language instanceof HtmlCompatibleLanguage) {
+      return true;
+    }
     return language == HTMLLanguage.INSTANCE || language == XHTMLLanguage.INSTANCE || language == XMLLanguage.INSTANCE;
   }