boolean (PsiDocToken token) { boolean result = false; while (token != null) { String text = token.getText(); int closingPreTagIndex = StringUtil.toLowerCase(text).lastIndexOf("</pre>"); int openingPreTagIndex = StringUtil.toLowerCase(text).lastIndexOf("<pre>"); result = openingPreTagIndex != -1 && (closingPreTagIndex == -1 || closingPreTagIndex < openingPreTagIndex); if (closingPreTagIndex != -1 || openingPreTagIndex != -1) break; token = PsiTreeUtil.getPrevSiblingOfType(token, PsiDocToken.class); } return result; }