From fb001e557d16edd13c091b1b9423a3b2998ed512 Mon Sep 17 00:00:00 2001 From: Grant Mathews Date: Tue, 17 Jan 2017 17:44:54 -0800 Subject: [PATCH] codehilite: detect languages with funny names Extend the language regex to match things like 'C#' and 'VB.Net'. --- markdown/extensions/codehilite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown/extensions/codehilite.py b/markdown/extensions/codehilite.py index 0657c3768..20b889c44 100644 --- a/markdown/extensions/codehilite.py +++ b/markdown/extensions/codehilite.py @@ -166,7 +166,7 @@ def _parseHeader(self): c = re.compile(r''' (?:(?:^::+)|(?P^[#]!)) # Shebang or 2 or more colons (?P(?:/\w+)*[/ ])? # Zero or 1 path - (?P[\w+-]*) # The language + (?P[\w#.+-]*) # The language \s* # Arbitrary whitespace # Optional highlight lines, single- or double-quote-delimited (hl_lines=(?P"|')(?P.*?)(?P=quot))?