diff options
Diffstat (limited to 'src/main/java/com/gitblit/utils/MarkdownUtils.java')
-rw-r--r-- | src/main/java/com/gitblit/utils/MarkdownUtils.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/utils/MarkdownUtils.java b/src/main/java/com/gitblit/utils/MarkdownUtils.java index 2ebfdb26..e0c9dd4e 100644 --- a/src/main/java/com/gitblit/utils/MarkdownUtils.java +++ b/src/main/java/com/gitblit/utils/MarkdownUtils.java @@ -16,6 +16,7 @@ package com.gitblit.utils;
import static org.pegdown.Extensions.ALL;
+import static org.pegdown.Extensions.ANCHORLINKS;
import static org.pegdown.Extensions.SMARTYPANTS;
import java.io.IOException;
@@ -76,7 +77,7 @@ public class MarkdownUtils { */
public static String transformMarkdown(String markdown, LinkRenderer linkRenderer) {
try {
- PegDownProcessor pd = new PegDownProcessor(ALL & ~SMARTYPANTS);
+ PegDownProcessor pd = new PegDownProcessor(ALL & ~SMARTYPANTS & ~ANCHORLINKS);
RootNode astRoot = pd.parseMarkdown(markdown.toCharArray());
return new WorkaroundHtmlSerializer(linkRenderer == null ? new LinkRenderer() : linkRenderer).toHtml(astRoot);
} catch (ParsingTimeoutException e) {
|