TextRange (@NotNull ASTNode node, @NotNull TextRange range) { PsiElement psiElement = node.getPsi(); if (psiElement != null && psiElement.isValid() && psiElement.getLanguage().isKindOf(HTMLLanguage.INSTANCE)) { PsiFile file = psiElement.getContainingFile(); PsiElement fileContext = file.getContext(); String contextQuote = fileContext != null ? Character.toString(fileContext.getText().charAt(0)) : null; CodeStyleSettings rootSettings = CodeStyle.getSettings(file); HtmlCodeStyleSettings htmlSettings = rootSettings.getCustomSettings(HtmlCodeStyleSettings.class); CodeStyleSettings.QuoteStyle quoteStyle = htmlSettings.HTML_QUOTE_STYLE; if (quoteStyle != CodeStyleSettings.QuoteStyle.None && htmlSettings.HTML_ENFORCE_QUOTES && !StringUtil.equals(quoteStyle.quote, contextQuote)) { PostFormatProcessorHelper postFormatProcessorHelper = new PostFormatProcessorHelper(rootSettings.getCommonSettings(HTMLLanguage.INSTANCE)); postFormatProcessorHelper.setResultTextRange(range); HtmlQuotesConverter converter = new HtmlQuotesConverter(quoteStyle, psiElement, postFormatProcessorHelper); Document document = converter.getDocument(); if (document != null) { DocumentUtil.executeInBulk(document, converter); } return postFormatProcessorHelper.getResultTextRange(); } } return range; }