private void combineTrailingCRWith(@NotNull String currentText) {
    if (StringUtil.startsWith(currentText, "\n")) {
      TokenInfo last = tokens.removeLast();
      String lastTextWithNoCR = last.getText().substring(0, last.length() - 1);
      if (!lastTextWithNoCR.isEmpty()) {
        TokenInfo newLast = new TokenInfo(last.contentType, lastTextWithNoCR, last.getHyperlinkInfo());
        tokens.addLast(newLast);
        size --;
      }
      return;
    }
    removeLastLine();
  }
private void combineTrailingCRWith(@NotNull String currentText)