git » git-arr » commit 53155e5

markdown: Enable table and fenced code extensions

author Alberto Bertogli
2016-11-03 01:45:46 UTC
committer Alberto Bertogli
2016-11-03 01:45:46 UTC
parent c648cfb593f345f0a1d07f43c34905643fc073e1

markdown: Enable table and fenced code extensions

This patch enables the table and fenced code extensions in markdown
processing.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

utils.py +5 -1

diff --git a/utils.py b/utils.py
index a7d2886..008f11a 100644
--- a/utils.py
+++ b/utils.py
@@ -97,7 +97,11 @@ def colorize_blob(fname, s):
     return highlight(s, lexer, formatter)
 
 def markdown_blob(s):
-    return markdown.markdown(s)
+    extensions = [
+        "markdown.extensions.fenced_code",
+        "markdown.extensions.tables",
+    ]
+    return markdown.markdown(s, extensions = extensions)
 
 def embed_image_blob(fname, image_data):
     mimetype = mimetypes.guess_type(fname)[0]