Skip to content
Permalink
Browse files
switch from clunky {% highlight lang %} to fenced code blocks.
  • Loading branch information
acg committed May 1, 2017
1 parent 12df3bc commit d6ea6fe0bf58ef6a28776a7f4f0b622f8c47c747
Showing 1 changed file with 3 additions and 3 deletions.
@@ -475,15 +475,15 @@ def filter_markdown(value):

value = unicode(value)

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

re_highlight = re.compile(r'''
^
\{% \s+ highlight \s+ (?P<language>\S+) \s+ %\}
```(?P<language>\S+) \s*
\n
(?P<content>.*)
\n
\{% \s+ endhighlight \s+ %\}
```
$
''', re.S|re.X)

0 comments on commit d6ea6fe

Please sign in to comment.