From 1106db450de5f96a2384400f08ac6afef0bb5988 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Fri, 22 Aug 2008 13:04:07 -0400 Subject: Fixed some weirdness with the CodeHilite ext and the fallback for when pygments is not available. Not sure why, but the no-line-numbers option was commented out with a bug in it. --- markdown_extensions/codehilite.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/markdown_extensions/codehilite.py b/markdown_extensions/codehilite.py index 73c1a79..890a66b 100644 --- a/markdown_extensions/codehilite.py +++ b/markdown_extensions/codehilite.py @@ -80,11 +80,10 @@ class CodeHilite: except ImportError: # just escape and pass through txt = self._escape(self.src) - '''if num: + if self.linenos: txt = self._number(txt) else : - txt = '
%s
\n'% txt''' - txt = self._number(txt) + txt = '
%s
\n'% txt return txt else: try: -- cgit v1.2.3