String (@NotNull Project project, @NotNull @Nls String str, @NotNull Convertor<@Nls ? super String, @Nls String> convertor) { if (StringUtil.isEmpty(str)) return ""; @Nls StringBuilder commentBuilder = new StringBuilder(); String comment = XmlStringUtil.escapeString(VcsUtil.trimCommitMessageToSaneSize(str), false); IssueNavigationConfiguration.processTextWithLinks(comment, IssueNavigationConfiguration.getInstance(project).findIssueLinks(comment), s -> commentBuilder.append(convertor.convert(s)), (text, target) -> { commentBuilder .append("<a href=\"") .append(target).append("\">") .append(text).append("</a>"); }); return commentBuilder.toString().replace("\n", UIUtil.BR); }