mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
A fix for WI-28533 Code reformat does not reformat PHP when the file is named pi.json.php
This commit is contained in:
@@ -15,5 +15,6 @@
|
||||
<orderEntry type="module" module-name="xml-openapi" />
|
||||
<orderEntry type="module" module-name="spellchecker" />
|
||||
<orderEntry type="library" name="Guava" level="project" />
|
||||
<orderEntry type="module" module-name="webide-impl" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -13,9 +13,11 @@ import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.TokenType;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettings;
|
||||
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
|
||||
import com.intellij.psi.templateLanguages.OuterLanguageElement;
|
||||
import com.intellij.psi.tree.TokenSet;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.webcore.template.formatter.TemplateFormatUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -142,6 +144,10 @@ public class JsonBlock implements ASTBlock {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (childNode.getPsi() instanceof OuterLanguageElement) {
|
||||
Block templateBlock = TemplateFormatUtil.buildTemplateLanguageBlock((OuterLanguageElement)childNode.getPsi(), mySettings, indent);
|
||||
if (templateBlock != null) return templateBlock;
|
||||
}
|
||||
return new JsonBlock(this, childNode, mySettings, alignment, indent, wrap);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user