Emmet: fix surrounding html comment (WEB-19796)

This commit is contained in:
Alexander Zolotov
2016-12-30 17:23:31 +03:00
parent 432cb2d2cc
commit 44be16f73c
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,7 +44,8 @@ public class HtmlTextContextType extends TemplateContextType {
}
public static boolean isInContext(@NotNull PsiElement element) {
if (PsiTreeUtil.getParentOfType(element, XmlComment.class) != null) {
if (PsiTreeUtil.getParentOfType(element, XmlComment.class) != null
&& element.getNode().getElementType() != XmlTokenType.XML_COMMENT_START) {
return false;
}
if (PsiTreeUtil.getParentOfType(element, XmlText.class) != null) {