You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2016/01/06 18:06:26 UTC

[2/4] allura git commit: [#7987] ticket:882 uset FencedCodeProcessor for fence code

[#7987] ticket:882 uset FencedCodeProcessor for fence code


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/b8712c0c
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/b8712c0c
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/b8712c0c

Branch: refs/heads/master
Commit: b8712c0c0fe237bf2d3841630e557efb57868c75
Parents: 19c532f
Author: Denis Kotov <de...@gmail.com>
Authored: Fri Dec 25 21:22:34 2015 +0200
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Wed Jan 6 12:06:03 2016 -0500

----------------------------------------------------------------------
 Allura/allura/lib/markdown_extensions.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/b8712c0c/Allura/allura/lib/markdown_extensions.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/markdown_extensions.py b/Allura/allura/lib/markdown_extensions.py
index cbccf5d..016c5e4 100644
--- a/Allura/allura/lib/markdown_extensions.py
+++ b/Allura/allura/lib/markdown_extensions.py
@@ -21,6 +21,7 @@ from urlparse import urljoin
 
 from tg import config
 from bs4 import BeautifulSoup
+from markdown.extensions.fenced_code import FencedBlockPreprocessor
 import html5lib
 import html5lib.serializer
 import html5lib.filters.alphabeticalattributes
@@ -248,7 +249,7 @@ class ForgeExtension(markdown.Extension):
         # allow markdown within e.g. <div markdown>...</div>  More info at:
         # https://github.com/waylan/Python-Markdown/issues/52
         md.preprocessors['html_block'].markdown_in_raw = True
-        md.preprocessors['fenced-code'] = FencedCodeProcessor()
+        md.preprocessors['fenced-code'] = FencedBlockPreprocessor(md)
         md.preprocessors.add('plain_text_block', PlainTextPreprocessor(md), "_begin")
         md.preprocessors.add('macro_include', ForgeMacroIncludePreprocessor(md), '_end')
         # this has to be before the 'escape' processor, otherwise weird