aboutsummaryrefslogtreecommitdiffstats
path: root/markdown_extensions
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2008-09-18 22:13:46 -0400
committerWaylan Limberg <waylan@gmail.com>2008-09-18 22:13:46 -0400
commit7fdc7f9f2f5e61d6d779e07879d0b98c5635facf (patch)
treecbd5533706b1659a32ff07735b3a30277baf88e8 /markdown_extensions
parentc05e63384737c7b681457842686e1544590fdb30 (diff)
downloadmarkdown-7fdc7f9f2f5e61d6d779e07879d0b98c5635facf.tar.gz
markdown-7fdc7f9f2f5e61d6d779e07879d0b98c5635facf.tar.bz2
markdown-7fdc7f9f2f5e61d6d779e07879d0b98c5635facf.zip
[CodeHilite] Modified Sheband regex to match against language aliases supported by Pygments which contain + or -. Thanks David A. Krauth.
Diffstat (limited to 'markdown_extensions')
-rw-r--r--markdown_extensions/codehilite.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/markdown_extensions/codehilite.py b/markdown_extensions/codehilite.py
index 55b9055..a96aaaa 100644
--- a/markdown_extensions/codehilite.py
+++ b/markdown_extensions/codehilite.py
@@ -151,10 +151,8 @@ class CodeHilite:
c = re.compile(r'''
(?:(?:::+)|(?P<shebang>[#]!)) # Shebang or 2 or more colons.
- (?P<path>(?:/\w+)*[/ ])? # Zero or 1 path ending in either
- # a / or a single space.
- (?P<lang>\w*) # The language (a single / or
- # space before lang is a path).
+ (?P<path>(?:/\w+)*[/ ])? # Zero or 1 path
+ (?P<lang>[\w+-]*) # The language
''', re.VERBOSE)
# search first line for shebang
m = c.search(fl)