*Fix anchor links

This commit is contained in:
Jesse Boyd 2017-04-19 05:59:18 +10:00
parent 31e64eaaf4
commit 156473356d
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -126,7 +126,7 @@ public final class DocumentationPrinter {
private static void writePermissionsWikiTable(PrintStream stream, StringBuilder content, String prefix, Class<?> cls) { private static void writePermissionsWikiTable(PrintStream stream, StringBuilder content, String prefix, Class<?> cls) {
String title = cls.getSimpleName().replaceAll("(\\p{Ll})(\\p{Lu})", "$1 $2"); String title = cls.getSimpleName().replaceAll("(\\p{Ll})(\\p{Lu})", "$1 $2");
stream.print(" - [`" + title + "`](#" + title.replaceAll(" ", "-") + "-) "); stream.print(" - [`" + title + "`](#" + title.replaceAll(" ", "-").toLowerCase() + "-) ");
Command cmd = cls.getAnnotation(Command.class); Command cmd = cls.getAnnotation(Command.class);
if (cmd != null) { if (cmd != null) {
stream.print(" (" + cmd.desc() + ")"); stream.print(" (" + cmd.desc() + ")");