diff options
author | Waylan Limberg <waylan@gmail.com> | 2008-08-22 13:04:07 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2008-08-22 13:04:07 -0400 |
commit | 1106db450de5f96a2384400f08ac6afef0bb5988 (patch) | |
tree | 21122c18c9d9b5644167cdc1dc43f5181a54fe9f /markdown_extensions/codehilite.py | |
parent | 41f4e32e758ab3642b5e110db220f6a0f24b2ba4 (diff) | |
download | markdown-1106db450de5f96a2384400f08ac6afef0bb5988.tar.gz markdown-1106db450de5f96a2384400f08ac6afef0bb5988.tar.bz2 markdown-1106db450de5f96a2384400f08ac6afef0bb5988.zip |
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.
Diffstat (limited to 'markdown_extensions/codehilite.py')
-rw-r--r-- | markdown_extensions/codehilite.py | 5 |
1 files 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 = '<div class="codehilite"><pre>%s</pre></div>\n'% txt''' - txt = self._number(txt) + txt = '<div class="codehilite"><pre>%s</pre></div>\n'% txt return txt else: try: |