void (@NotNull XmlTag xmlTag, @NotNull XmlElementArrangementEntry xmlTagEntry, @Nullable Document document, @NotNull Collection<? extends TextRange> ranges) { if (!StringUtil.equals(xmlTag.getName(), HtmlUtil.SCRIPT_TAG_NAME) && !StringUtil.equals(xmlTag.getName(), HtmlUtil.STYLE_TAG_NAME)) { return; } for (XmlTagChild child : xmlTag.getValue().getChildren()) { Language childLanguage = child.getLanguage(); if (childLanguage.isKindOf(XMLLanguage.INSTANCE)) { continue; } Rearranger<?> rearranger = Rearranger.EXTENSION.forLanguage(childLanguage); ArrangementSettings arrangementSettingsForLanguage = ArrangementUtil.getArrangementSettings(CodeStyle.getSettings(child.getContainingFile()), childLanguage); if (arrangementSettingsForLanguage == null || rearranger == null) { continue; } List<? extends ArrangementEntry> foreignEntries = rearranger.parse(child, document, ranges, arrangementSettingsForLanguage); if (!foreignEntries.isEmpty()) { ForeignEntry foreignParent = new ForeignEntry(xmlTagEntry, child.getTextRange()); for (ArrangementEntry foreignEntry : foreignEntries) { foreignParent.addChild(foreignEntry); } xmlTagEntry.addChild(foreignParent); } } }