mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix emmet wrapping
This commit is contained in:
@@ -26,6 +26,7 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.xml.XmlTag;
|
||||
import com.intellij.psi.xml.XmlTokenType;
|
||||
import com.intellij.util.containers.Stack;
|
||||
import com.intellij.xml.util.HtmlUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -79,7 +80,7 @@ public class XmlEmmetParser extends EmmetParser {
|
||||
super(tokens, callback, generator);
|
||||
PsiElement context = callback.getContext();
|
||||
XmlTag parentTag = PsiTreeUtil.getParentOfType(context, XmlTag.class);
|
||||
if (surroundWithTemplate && parentTag != null) {
|
||||
if (surroundWithTemplate && parentTag != null && context.getNode().getElementType() == XmlTokenType.XML_START_TAG_START) {
|
||||
parentTag = PsiTreeUtil.getParentOfType(parentTag, XmlTag.class);
|
||||
}
|
||||
if (parentTag != null) {
|
||||
|
||||
Reference in New Issue
Block a user