summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/pages
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-10-18 17:46:22 -0400
committerJames Moger <james.moger@gitblit.com>2013-10-18 17:46:22 -0400
commit0365f6248d6aaa7c765ac63273c282d16161a623 (patch)
tree84b61897721c5bed58a8425b0ccb0c1e6ee7e254 /src/main/java/com/gitblit/wicket/pages
parent1feb04e5a907d06b2bf632395ba8d164931c0904 (diff)
downloadgitblit-0365f6248d6aaa7c765ac63273c282d16161a623.tar.gz
gitblit-0365f6248d6aaa7c765ac63273c282d16161a623.zip
Replaced MarkdownPapers with pegdown
Change-Id: I11eb50ba1ef0bef8ac47bf6f7b17e0f79ecd3f2d
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/MarkdownPage.java4
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RepositoryPage.java2
-rw-r--r--src/main/java/com/gitblit/wicket/pages/SummaryPage.java4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/MarkdownPage.java b/src/main/java/com/gitblit/wicket/pages/MarkdownPage.java
index 5aa80294..188a5b4b 100644
--- a/src/main/java/com/gitblit/wicket/pages/MarkdownPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/MarkdownPage.java
@@ -16,7 +16,6 @@
package com.gitblit.wicket.pages;
import java.text.MessageFormat;
-import java.text.ParseException;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.basic.Label;
@@ -60,7 +59,8 @@ public class MarkdownPage extends RepositoryPage {
String htmlText;
try {
htmlText = MarkdownUtils.transformMarkdown(markdownText);
- } catch (ParseException p) {
+ } catch (Exception e) {
+ logger.error("failed to transform markdown", e);
markdownText = MessageFormat.format("<div class=\"alert alert-error\"><strong>{0}:</strong> {1}</div>{2}", getString("gb.error"), getString("gb.markdownFailure"), markdownText);
htmlText = StringUtils.breakLinesForHtml(markdownText);
}
diff --git a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
index e5ce22a1..dabaed03 100644
--- a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
@@ -75,7 +75,7 @@ import com.gitblit.wicket.panels.RefsPanel;
public abstract class RepositoryPage extends RootPage {
- private final Logger logger = LoggerFactory.getLogger(getClass());
+ protected final Logger logger = LoggerFactory.getLogger(getClass());
private final String PARAM_STAR = "star";
diff --git a/src/main/java/com/gitblit/wicket/pages/SummaryPage.java b/src/main/java/com/gitblit/wicket/pages/SummaryPage.java
index 00d77a4e..cc9697c6 100644
--- a/src/main/java/com/gitblit/wicket/pages/SummaryPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/SummaryPage.java
@@ -18,7 +18,6 @@ package com.gitblit.wicket.pages;
import java.awt.Color;
import java.awt.Dimension;
import java.text.MessageFormat;
-import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
@@ -166,7 +165,8 @@ public class SummaryPage extends RepositoryPage {
markdownText = JGitUtils.getStringContent(r, head.getTree(), readme, encodings);
htmlText = MarkdownUtils.transformMarkdown(markdownText);
}
- } catch (ParseException p) {
+ } catch (Exception e) {
+ logger.error("failed to transform markdown", e);
markdownText = MessageFormat.format("<div class=\"alert alert-error\"><strong>{0}:</strong> {1}</div>{2}", getString("gb.error"), getString("gb.markdownFailure"), markdownText);
htmlText = StringUtils.breakLinesForHtml(markdownText);
}