private static int tryExtendHyperlinkEnd(boolean hyperlinkFreezed, int hyperlinkEndInd,
                                           int groupStartInd, int groupEndInd) {
    if (!hyperlinkFreezed && (hyperlinkEndInd == groupStartInd || hyperlinkEndInd + 1 == groupStartInd)) {
      return groupEndInd;
    }
    return hyperlinkEndInd;
  }
private static int tryExtendHyperlinkEnd(boolean hyperlinkFreezed, int hyperlinkEndInd,
                                           int groupStartInd, int groupEndInd)