diff options
-rw-r--r-- | .classpath | 14 | ||||
-rw-r--r-- | build.moxie | 2 | ||||
-rw-r--r-- | gitblit.iml | 42 | ||||
-rw-r--r-- | src/main/java/com/gitblit/utils/MarkdownUtils.java | 3 |
4 files changed, 31 insertions, 30 deletions
@@ -28,13 +28,13 @@ <classpathentry kind="lib" path="ext/lucene-queryparser-4.10.0.jar" sourcepath="ext/src/lucene-queryparser-4.10.0.jar" /> <classpathentry kind="lib" path="ext/lucene-sandbox-4.10.0.jar" sourcepath="ext/src/lucene-sandbox-4.10.0.jar" /> <classpathentry kind="lib" path="ext/jakarta-regexp-1.4.jar" /> - <classpathentry kind="lib" path="ext/pegdown-1.4.2.jar" sourcepath="ext/src/pegdown-1.4.2.jar" /> - <classpathentry kind="lib" path="ext/parboiled-java-1.1.6.jar" sourcepath="ext/src/parboiled-java-1.1.6.jar" /> - <classpathentry kind="lib" path="ext/parboiled-core-1.1.6.jar" sourcepath="ext/src/parboiled-core-1.1.6.jar" /> - <classpathentry kind="lib" path="ext/asm-4.1.jar" sourcepath="ext/src/asm-4.1.jar" /> - <classpathentry kind="lib" path="ext/asm-tree-4.1.jar" sourcepath="ext/src/asm-tree-4.1.jar" /> - <classpathentry kind="lib" path="ext/asm-analysis-4.1.jar" sourcepath="ext/src/asm-analysis-4.1.jar" /> - <classpathentry kind="lib" path="ext/asm-util-4.1.jar" sourcepath="ext/src/asm-util-4.1.jar" /> + <classpathentry kind="lib" path="ext/pegdown-1.5.0.jar" sourcepath="ext/src/pegdown-1.5.0.jar" /> + <classpathentry kind="lib" path="ext/parboiled-java-1.1.7.jar" sourcepath="ext/src/parboiled-java-1.1.7.jar" /> + <classpathentry kind="lib" path="ext/parboiled-core-1.1.7.jar" sourcepath="ext/src/parboiled-core-1.1.7.jar" /> + <classpathentry kind="lib" path="ext/asm-5.0.3.jar" sourcepath="ext/src/asm-5.0.3.jar" /> + <classpathentry kind="lib" path="ext/asm-tree-5.0.3.jar" sourcepath="ext/src/asm-tree-5.0.3.jar" /> + <classpathentry kind="lib" path="ext/asm-analysis-5.0.3.jar" sourcepath="ext/src/asm-analysis-5.0.3.jar" /> + <classpathentry kind="lib" path="ext/asm-util-5.0.3.jar" sourcepath="ext/src/asm-util-5.0.3.jar" /> <classpathentry kind="lib" path="ext/wikitext-core-1.4.jar" sourcepath="ext/src/wikitext-core-1.4.jar" /> <classpathentry kind="lib" path="ext/twiki-core-1.4.jar" sourcepath="ext/src/twiki-core-1.4.jar" /> <classpathentry kind="lib" path="ext/textile-core-1.4.jar" sourcepath="ext/src/textile-core-1.4.jar" /> diff --git a/build.moxie b/build.moxie index 311e26df..8d92fda0 100644 --- a/build.moxie +++ b/build.moxie @@ -148,7 +148,7 @@ dependencies: - compile 'org.apache.lucene:lucene-highlighter:${lucene.version}' :war :fedclient - compile 'org.apache.lucene:lucene-memory:${lucene.version}' :war :fedclient - compile 'org.apache.lucene:lucene-queryparser:${lucene.version}' :war :fedclient -- compile 'org.pegdown:pegdown:1.4.2' :war +- compile 'org.pegdown:pegdown:1.5.0' :war - compile 'org.fusesource.wikitext:wikitext-core:${wikitext.version}' :war - compile 'org.fusesource.wikitext:twiki-core:${wikitext.version}' :war - compile 'org.fusesource.wikitext:textile-core:${wikitext.version}' :war diff --git a/gitblit.iml b/gitblit.iml index 343f24e4..55903760 100644 --- a/gitblit.iml +++ b/gitblit.iml @@ -265,79 +265,79 @@ </library> </orderEntry> <orderEntry type="module-library"> - <library name="pegdown-1.4.2.jar"> + <library name="pegdown-1.5.0.jar"> <CLASSES> - <root url="jar://$MODULE_DIR$/ext/pegdown-1.4.2.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/pegdown-1.5.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES> - <root url="jar://$MODULE_DIR$/ext/src/pegdown-1.4.2.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/src/pegdown-1.5.0.jar!/" /> </SOURCES> </library> </orderEntry> <orderEntry type="module-library"> - <library name="parboiled-java-1.1.6.jar"> + <library name="parboiled-java-1.1.7.jar"> <CLASSES> - <root url="jar://$MODULE_DIR$/ext/parboiled-java-1.1.6.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/parboiled-java-1.1.7.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES> - <root url="jar://$MODULE_DIR$/ext/src/parboiled-java-1.1.6.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/src/parboiled-java-1.1.7.jar!/" /> </SOURCES> </library> </orderEntry> <orderEntry type="module-library"> - <library name="parboiled-core-1.1.6.jar"> + <library name="parboiled-core-1.1.7.jar"> <CLASSES> - <root url="jar://$MODULE_DIR$/ext/parboiled-core-1.1.6.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/parboiled-core-1.1.7.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES> - <root url="jar://$MODULE_DIR$/ext/src/parboiled-core-1.1.6.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/src/parboiled-core-1.1.7.jar!/" /> </SOURCES> </library> </orderEntry> <orderEntry type="module-library"> - <library name="asm-4.1.jar"> + <library name="asm-5.0.3.jar"> <CLASSES> - <root url="jar://$MODULE_DIR$/ext/asm-4.1.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/asm-5.0.3.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES> - <root url="jar://$MODULE_DIR$/ext/src/asm-4.1.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/src/asm-5.0.3.jar!/" /> </SOURCES> </library> </orderEntry> <orderEntry type="module-library"> - <library name="asm-tree-4.1.jar"> + <library name="asm-tree-5.0.3.jar"> <CLASSES> - <root url="jar://$MODULE_DIR$/ext/asm-tree-4.1.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/asm-tree-5.0.3.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES> - <root url="jar://$MODULE_DIR$/ext/src/asm-tree-4.1.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/src/asm-tree-5.0.3.jar!/" /> </SOURCES> </library> </orderEntry> <orderEntry type="module-library"> - <library name="asm-analysis-4.1.jar"> + <library name="asm-analysis-5.0.3.jar"> <CLASSES> - <root url="jar://$MODULE_DIR$/ext/asm-analysis-4.1.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/asm-analysis-5.0.3.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES> - <root url="jar://$MODULE_DIR$/ext/src/asm-analysis-4.1.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/src/asm-analysis-5.0.3.jar!/" /> </SOURCES> </library> </orderEntry> <orderEntry type="module-library"> - <library name="asm-util-4.1.jar"> + <library name="asm-util-5.0.3.jar"> <CLASSES> - <root url="jar://$MODULE_DIR$/ext/asm-util-4.1.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/asm-util-5.0.3.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES> - <root url="jar://$MODULE_DIR$/ext/src/asm-util-4.1.jar!/" /> + <root url="jar://$MODULE_DIR$/ext/src/asm-util-5.0.3.jar!/" /> </SOURCES> </library> </orderEntry> 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) {
|