private boolean isOpeningTripleQuote(HighlighterIterator iterator, int offset) {
    final CharSequence text = iterator.getDocument().getCharsSequence();
    char theQuote = text.charAt(offset);

    final IElementType tokenType = iterator.getTokenType();
    // if we're next to two same quotes, auto-close triple quote
    if (getOpeningQuotesTokens().contains(tokenType)) {
      if (
        offset >= 2 &&
        text.charAt(offset - 1) == theQuote &&
        text.charAt(offset - 2) == theQuote &&
        (offset < 3 || text.charAt(offset - 3) != theQuote)
        ) {
        return getLiteralStartOffset(text, iterator.getStart()) == offset - 2;
      }
    }
    return false;
  }
private boolean isOpeningTripleQuote(HighlighterIterator iterator, int offset)