506fc48e108b default tip

Enable fenced code blocks
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 15 Jan 2020 19:02:22 -0500
parents 1758d8b993d0
children (none)
branches/tags default tip
files __init__.py

Changes

diff -r 1758d8b993d0 -r 506fc48e108b __init__.py
--- a/__init__.py	Wed Jan 15 18:38:21 2020 -0500
+++ b/__init__.py	Wed Jan 15 19:02:22 2020 -0500
@@ -22,7 +22,7 @@
         if parts[0] == 'readme':
             content = cctx.filectx(filename).data().decode("utf-8")
             if parts[-1] in ['markdown', 'md']:
-                md = Markdown(extensions=[TocExtension(anchorlink=True)])
+                md = Markdown(extensions=['fenced_code', TocExtension(anchorlink=True)])
                 content = md.convert(content).encode("utf-8")
             else:
                 content = "<pre>" + escape(content) + "</pre>"