Skip to content

Commit b52293b

Browse files
authored
Update fenced code extension to match codehilite lang regex. (#529)
Related to #527.
1 parent 41101dc commit b52293b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

markdown/extensions/fenced_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def extendMarkdown(self, md, md_globals):
3737
class FencedBlockPreprocessor(Preprocessor):
3838
FENCED_BLOCK_RE = re.compile(r'''
3939
(?P<fence>^(?:~{3,}|`{3,}))[ ]* # Opening ``` or ~~~
40-
(\{?\.?(?P<lang>[a-zA-Z0-9_+-]*))?[ ]* # Optional {, and lang
40+
(\{?\.?(?P<lang>[\w#.+-]*))?[ ]* # Optional {, and lang
4141
# Optional highlight lines, single- or double-quote-delimited
4242
(hl_lines=(?P<quot>"|')(?P<hl_lines>.*?)(?P=quot))?[ ]*
4343
}?[ ]*\n # Optional closing }

0 commit comments

Comments
 (0)