StringBuilder ( boolean doHighlighting, @NotNull StringBuilder buffer, @NotNull Project project, @NotNull Language language, @Nullable String codeSnippet ) { if (doHighlighting) { HtmlSyntaxInfoUtil.appendHighlightedByLexerAndEncodedAsHtmlCodeSnippet( buffer, project, language, codeSnippet, getHighlightingSaturation()); } else if (codeSnippet != null) { codeSnippet = StringsKt.trimIndent(codeSnippet); codeSnippet = StringUtil.escapeXmlEntities(codeSnippet); codeSnippet = codeSnippet.replace("\n", BR_TAG); buffer.append(codeSnippet); } return buffer; }