aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2012-05-18 14:36:36 +0000
committerWaylan Limberg <waylan@gmail.com>2012-05-18 14:36:36 +0000
commit3ce80f612126621cecf641856efe42d650c90bf3 (patch)
tree22a80eb5e2cf9f1e8d1d2e064292ab9c54f47b0a
parent803a98283b64a469f453f6f01de0dae67b3f35ee (diff)
downloadmarkdown-3ce80f612126621cecf641856efe42d650c90bf3.tar.gz
markdown-3ce80f612126621cecf641856efe42d650c90bf3.tar.bz2
markdown-3ce80f612126621cecf641856efe42d650c90bf3.zip
Fixed Issue #98. The language designator must start at the beginging of the first line of a code block for codehilite to recognize it.
-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 5df820f..0e0d32d 100644
--- a/markdown/extensions/codehilite.py
+++ b/markdown/extensions/codehilite.py
@@ -138,7 +138,7 @@ class CodeHilite:
fl = lines.pop(0)
c = re.compile(r'''
- (?:(?:::+)|(?P<shebang>[#]!)) # Shebang or 2 or more colons.
+ (?:(?:^::+)|(?P<shebang>^[#]!)) # Shebang or 2 or more colons.
(?P<path>(?:/\w+)*[/ ])? # Zero or 1 path
(?P<lang>[\w+-]*) # The language
''', re.VERBOSE)