Skip to content

Commit d6ea6fe

Browse files
committed
switch from clunky {% highlight lang %} to fenced code blocks.
1 parent 12df3bc commit d6ea6fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/tinysite.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -475,15 +475,15 @@ def filter_markdown(value):
475475

476476
value = unicode(value)
477477

478-
# Recognize {% highlight foo %}...{% endhighlight %} blocks in markdown.
478+
# Recognize ```lang "fenced code" blocks in markdown.
479479

480480
re_highlight = re.compile(r'''
481481
^
482-
\{% \s+ highlight \s+ (?P<language>\S+) \s+ %\}
482+
```(?P<language>\S+) \s*
483483
\n
484484
(?P<content>.*)
485485
\n
486-
\{% \s+ endhighlight \s+ %\}
486+
```
487487
$
488488
''', re.S|re.X)
489489

0 commit comments

Comments
 (0)