Browse Source

Update to Pegdown 1.5.0

tags/v1.7.0
James Moger 8 years ago
parent
commit
2694044566
4 changed files with 31 additions and 30 deletions
  1. 7
    7
      .classpath
  2. 1
    1
      build.moxie
  3. 21
    21
      gitblit.iml
  4. 2
    1
      src/main/java/com/gitblit/utils/MarkdownUtils.java

+ 7
- 7
.classpath View File

@@ -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" />

+ 1
- 1
build.moxie View File

@@ -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

+ 21
- 21
gitblit.iml View File

@@ -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>

+ 2
- 1
src/main/java/com/gitblit/utils/MarkdownUtils.java View File

@@ -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) {

Loading…
Cancel
Save