diff options
author | Grant Mathews <grant.m.mathews@gmail.com> | 2017-01-17 19:39:38 -0800 |
---|---|---|
committer | Waylan Limberg <waylan.limberg@icloud.com> | 2017-01-17 22:39:38 -0500 |
commit | 41101dcaed9d77e14ef37fe29f0b903496ee1fd5 (patch) | |
tree | deb13f0e123af68b21f9f2c98e011276edac5772 | |
parent | aefad1b7f199a3f1dfaf055ada6e88a920be34ec (diff) | |
download | markdown-41101dcaed9d77e14ef37fe29f0b903496ee1fd5.tar.gz markdown-41101dcaed9d77e14ef37fe29f0b903496ee1fd5.tar.bz2 markdown-41101dcaed9d77e14ef37fe29f0b903496ee1fd5.zip |
codehilite: detect languages with funny names (#527)
Extend the language regex to match things like 'C#' and 'VB.Net'.
-rw-r--r-- | markdown/extensions/codehilite.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown/extensions/codehilite.py b/markdown/extensions/codehilite.py index 0657c37..20b889c 100644 --- a/markdown/extensions/codehilite.py +++ b/markdown/extensions/codehilite.py @@ -166,7 +166,7 @@ class CodeHilite(object): c = re.compile(r''' (?:(?:^::+)|(?P<shebang>^[#]!)) # Shebang or 2 or more colons (?P<path>(?:/\w+)*[/ ])? # Zero or 1 path - (?P<lang>[\w+-]*) # The language + (?P<lang>[\w#.+-]*) # The language \s* # Arbitrary whitespace # Optional highlight lines, single- or double-quote-delimited (hl_lines=(?P<quot>"|')(?P<hl_lines>.*?)(?P=quot))? |