protected static @Nullable String getLinkRef(@NonNls String text) {
    final String linkWithRef = "<a href=\"";
    int linkStartIdx = text.indexOf(linkWithRef);
    if (linkStartIdx >= 0) {
      String ref = text.substring(linkStartIdx + linkWithRef.length());
      int quoteIdx = ref.indexOf('"');
      if (quoteIdx > 0) {
        return ref.substring(0, quoteIdx);
      }
    }
    return null;
  }
protected static @Nullable String getLinkRef(@NonNls String text)