private @Nullable StringBuilder appendHtmlCodeBlockContents(@NotNull String text, @NotNull StringBuilder buffer,
                                                              @NotNull StringBuilder htmlCodeBlockContents,
                                                              @NotNull Pair<String, String> delimiters) {
    int suffixIndex = text.indexOf(delimiters.second);
    if (suffixIndex >= 0) {
      htmlCodeBlockContents.append(text, 0, suffixIndex);
      buffer.append(CODE_BLOCK_PREFIX);
      appendHighlightedByLexerAndEncodedAsHtmlCodeSnippet(
        doHighlightCodeBlocks(), buffer, myProject, JavaLanguage.INSTANCE,
        StringUtil.unescapeXmlEntities(StringUtil.replaceUnicodeEscapeSequences(htmlCodeBlockContents.toString()))
          .replace("&nbsp;", " "));
      buffer.append(CODE_BLOCK_SUFFIX);
      appendPlainText(buffer, text.substring(suffixIndex + delimiters.second.length()));
      return null;
    }
    else {
      return htmlCodeBlockContents.append(text);
    }
  }
private @Nullable StringBuilder appendHtmlCodeBlockContents(@NotNull String text, @NotNull StringBuilder buffer,
                                                              @NotNull StringBuilder htmlCodeBlockContents,
                                                              @NotNull Pair<String, String> delimiters)