boolean (@NotNull StringBuilder sb, @NotNull PsiElement element) { try { String name = getLinkReferenceText(element); if (!StringUtil.isEmpty(name)) { sb.append("<a href=\"#").append(getLinkProtocol()).append("/").append(name).append("\"><code>"); return true; } VirtualFile file = getVirtualFile(element); if (file == null) return false; int offset = element.getTextOffset(); sb.append("<a href=\"#navigation/"); sb.append(toSystemIndependentName(file.getPath())); sb.append(":").append(offset).append("\"><code>"); return true; } catch (Exception ignored) { return false; } }