Support triple backticks for code blocks
Committed 3a7611
--- a/web/markdown/__init__.py
+++ b/web/markdown/__init__.py
"""
- pattern = r"^[ ]{4}"
+ pattern = r"^([ ]{4}|`{3})"
def parse(self, block):
""""""
+ if block.lstrip().startswith("```") and block.rstrip().endswith("```"):
+ block = block.lstrip().rstrip()[3:-3]
text = dedent(block)
if text.startswith(">>> "):
lexer = pygments.lexers.PythonConsoleLexer()