private String replaceTags(String orig, String relPath) { String result = orig.replaceAll("(?m)^\\s*\\*", ""); // todo precompile regex // {@link processing hack} result = replaceAllTags(result, "", "", LINK_REGEX, relPath); // {@code processing hack} result = replaceAllTags(result, "<TT>", "</TT>", CODE_REGEX, relPath); // hack to reformat other groovydoc block tags (@see, @return, @param, @throws, @author, @since) into html result = replaceAllTags(result + "@endMarker", "<DL><DT><B>$1:</B></DT><DD>", "</DD></DL>", TAG_REGEX, relPath); // remove @endMarker result = result.substring(0, result.length() - 10); return SimpleGroovyClassDoc.decodeSpecialSymbols(result); }
public String replaceTags(String comment) { String result = comment.replaceAll("(?m)^\\s*\\*", ""); // todo precompile regex String relativeRootPath = getRelativeRootPath(); if (!relativeRootPath.endsWith("/")) { relativeRootPath += "/"; } result = result.replaceAll(DOCROOT_PATTERN2, relativeRootPath); result = result.replaceAll(DOCROOT_PATTERN, relativeRootPath); // {@link processing hack} result = replaceAllTags(result, "", "", LINK_REGEX); // {@literal tag} result = encodeAngleBracketsInTagBody(result, LITERAL_REGEX); result = replaceAllTags(result, "", "", LITERAL_REGEX); // {@code tag} result = encodeAngleBracketsInTagBody(result, CODE_REGEX); result = replaceAllTags(result, "<CODE>", "</CODE>", CODE_REGEX); // hack to reformat other groovydoc block tags (@see, @return, @param, @throws, @author, @since) into html result = replaceAllTagsCollated(result, "<DL><DT><B>", ":</B></DT><DD>", "</DD><DD>", "</DD></DL>", TAG_REGEX); return decodeSpecialSymbols(result); }
private String replaceTags(String orig, String relPath) { String result = orig.replaceAll("(?m)^\\s*\\*", ""); // todo precompile regex // {@link processing hack} result = replaceAllTags(result, "", "", LINK_REGEX, relPath); // {@code processing hack} result = replaceAllTags(result, "<TT>", "</TT>", CODE_REGEX, relPath); // hack to reformat other groovydoc block tags (@see, @return, @param, @throws, @author, @since) into html result = replaceAllTags(result + "@endMarker", "<DL><DT><B>$1:</B></DT><DD>", "</DD></DL>", TAG_REGEX, relPath); // remove @endMarker result = result.substring(0, result.length() - 10); return SimpleGroovyClassDoc.decodeSpecialSymbols(result); }
private String replaceTags(String orig, String relPath) { String result = orig.replaceAll("(?m)^\\s*\\*", ""); // todo precompile regex // {@link processing hack} result = replaceAllTags(result, "", "", LINK_REGEX, relPath); // {@code processing hack} result = replaceAllTags(result, "<TT>", "</TT>", CODE_REGEX, relPath); // hack to reformat other groovydoc block tags (@see, @return, @param, @throws, @author, @since) into html result = replaceAllTags(result + "@endMarker", "<DL><DT><B>$1:</B></DT><DD>", "</DD></DL>", TAG_REGEX, relPath); // remove @endMarker result = result.substring(0, result.length() - 10); return SimpleGroovyClassDoc.decodeSpecialSymbols(result); }
private String replaceTags(String orig, SimpleGroovyPackageDoc packageDoc) { String result = orig.replaceAll("(?m)^\\s*\\*", ""); // todo precompile regex // {@link processing hack} result = replaceAllTags(result, "", "", SimpleGroovyClassDoc.LINK_REGEX, packageDoc); // {@code processing hack} result = replaceAllTags(result, "<TT>", "</TT>", SimpleGroovyClassDoc.CODE_REGEX, packageDoc); // hack to reformat other groovydoc block tags (@see, @return, @param, @throws, @author, @since) into html result = replaceAllTags(result + "@endMarker", "<DL><DT><B>$1:</B></DT><DD>", "</DD></DL>", SimpleGroovyClassDoc.TAG_REGEX, packageDoc); // remove @endMarker result = result.substring(0, result.length() - 10); return SimpleGroovyClassDoc.decodeSpecialSymbols(result); }
public String replaceTags(String comment) { String result = comment.replaceAll("(?m)^\\s*\\*", ""); // todo precompile regex // {@link processing hack} result = replaceAllTags(result, "", "", LINK_REGEX); // {@code processing hack} result = replaceAllTags(result, "<TT>", "</TT>", CODE_REGEX); // hack to reformat other groovydoc block tags (@see, @return, @param, @throws, @author, @since) into html result = replaceAllTagsCollated(result, "<DL><DT><B>", ":</B></DT><DD>", "</DD><DD>", "</DD></DL>", TAG_REGEX); return decodeSpecialSymbols(result); }
public String replaceTags(String comment) { String result = comment.replaceAll("(?m)^\\s*\\*", ""); // todo precompile regex // {@link processing hack} result = replaceAllTags(result, "", "", LINK_REGEX); // {@code processing hack} result = replaceAllTags(result, "<TT>", "</TT>", CODE_REGEX); // hack to reformat other groovydoc block tags (@see, @return, @param, @throws, @author, @since) into html result = replaceAllTagsCollated(result, "<DL><DT><B>", ":</B></DT><DD>", "</DD><DD>", "</DD></DL>", TAG_REGEX); return decodeSpecialSymbols(result); }
public String replaceTags(String comment) { String result = comment.replaceAll("(?m)^\\s*\\*", ""); // todo precompile regex // {@link processing hack} result = replaceAllTags(result, "", "", LINK_REGEX); // {@code processing hack} result = replaceAllTags(result, "<TT>", "</TT>", CODE_REGEX); // hack to reformat other groovydoc tags (@see, @return, @link, @param, @throws, @author, @since) into html // todo: replace with proper tag support result = replaceAllTags(result, "<DL><DT><B>$1:</B></DT><DD>", "</DD></DL>", TAG_REGEX); return decodeSpecialSymbols(result); }
public String replaceTags(String comment) { String result = comment.replaceAll("(?m)^\\s*\\*", ""); // todo precompile regex String relativeRootPath = getRelativeRootPath(); if (!relativeRootPath.endsWith("/")) { relativeRootPath += "/"; } result = result.replaceAll(DOCROOT_PATTERN2, relativeRootPath); result = result.replaceAll(DOCROOT_PATTERN, relativeRootPath); // {@link processing hack} result = replaceAllTags(result, "", "", LINK_REGEX); // {@literal tag} result = encodeAngleBracketsInTagBody(result, LITERAL_REGEX); result = replaceAllTags(result, "", "", LITERAL_REGEX); // {@code tag} result = encodeAngleBracketsInTagBody(result, CODE_REGEX); result = replaceAllTags(result, "<CODE>", "</CODE>", CODE_REGEX); // hack to reformat other groovydoc block tags (@see, @return, @param, @throws, @author, @since) into html result = replaceAllTagsCollated(result, "<DL><DT><B>", ":</B></DT><DD>", "</DD><DD>", "</DD></DL>", TAG_REGEX); return decodeSpecialSymbols(result); }