aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/extensions
diff options
context:
space:
mode:
authorGrant Mathews <grant.m.mathews@gmail.com>2017-01-17 19:39:38 -0800
committerWaylan Limberg <waylan.limberg@icloud.com>2017-01-17 22:39:38 -0500
commit41101dcaed9d77e14ef37fe29f0b903496ee1fd5 (patch)
treedeb13f0e123af68b21f9f2c98e011276edac5772 /markdown/extensions
parentaefad1b7f199a3f1dfaf055ada6e88a920be34ec (diff)
downloadmarkdown-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'.
Diffstat (limited to 'markdown/extensions')
-rw-r--r--markdown/extensions/codehilite.py2
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))?