From 3ce80f612126621cecf641856efe42d650c90bf3 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Fri, 18 May 2012 14:36:36 +0000 Subject: Fixed Issue #98. The language designator must start at the beginging of the first line of a code block for codehilite to recognize it. --- 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 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 or 2 or more colons. + (?:(?:^::+)|(?P^[#]!)) # Shebang or 2 or more colons. (?P(?:/\w+)*[/ ])? # Zero or 1 path (?P[\w+-]*) # The language ''', re.VERBOSE) -- cgit v1.2.3