From db893af8e6cb04db5c1b9fa4c7c676d206d98f44 Mon Sep 17 00:00:00 2001 From: takezoe Date: Mon, 6 May 2013 04:00:57 +0900 Subject: [PATCH] Enables FENCED_CODE_BLOCKS in Markdown. --- src/main/scala/view/helpers.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/view/helpers.scala b/src/main/scala/view/helpers.scala index 4756da9b4..0cef4d42a 100644 --- a/src/main/scala/view/helpers.scala +++ b/src/main/scala/view/helpers.scala @@ -27,7 +27,7 @@ object helpers { */ def markdown(value: String, repository: app.RepositoryInfo)(implicit context: app.Context): twirl.api.Html = { import org.pegdown._ - val html = new PegDownProcessor(Extensions.AUTOLINKS|Extensions.WIKILINKS) + val html = new PegDownProcessor(Extensions.AUTOLINKS|Extensions.WIKILINKS|Extensions.FENCED_CODE_BLOCKS) .markdownToHtml(value, new LinkRenderer(){ override def render(node: WikiLinkNode): Rendering = { try { @@ -53,7 +53,7 @@ object helpers { * Converts Markdown to HTML. This method does not support Wiki links. */ def markdown(value: String): twirl.api.Html = { - val html = new PegDownProcessor().markdownToHtml(value, new LinkRenderer()) + val html = new PegDownProcessor(Extensions.FENCED_CODE_BLOCKS).markdownToHtml(value, new LinkRenderer()) twirl.api.Html(html) }