1 parent 12df3bc commit d6ea6feCopy full SHA for d6ea6fe
1 file changed
lib/tinysite.py
@@ -475,15 +475,15 @@ def filter_markdown(value):
475
476
value = unicode(value)
477
478
- # Recognize {% highlight foo %}...{% endhighlight %} blocks in markdown.
+ # Recognize ```lang "fenced code" blocks in markdown.
479
480
re_highlight = re.compile(r'''
481
^
482
- \{% \s+ highlight \s+ (?P<language>\S+) \s+ %\}
+ ```(?P<language>\S+) \s*
483
\n
484
(?P<content>.*)
485
486
- \{% \s+ endhighlight \s+ %\}
+ ```
487
$
488
''', re.S|re.X)
489
0 commit comments