private static boolean isInPre(PsiDocTag tag) {
    PsiElement sibling = tag.getPrevSibling();
    while (sibling != null) {
      if (sibling instanceof PsiDocToken) {
        String text = StringUtil.toLowerCase(sibling.getText());
        int pos = text.lastIndexOf("pre>");
        if (pos > 0) {
          switch (text.charAt(pos - 1)) {
            case '<' -> {
              return true;
            }
            case '/' -> {
              return false;
            }
          }
        }
      }
      sibling = sibling.getPrevSibling();
    }
    return false;
  }
private static boolean isInPre(PsiDocTag tag)