aboutsummaryrefslogtreecommitdiffstats
path: root/markdown_extensions/codehilite.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2008-08-22 13:04:07 -0400
committerWaylan Limberg <waylan@gmail.com>2008-08-22 13:04:07 -0400
commit1106db450de5f96a2384400f08ac6afef0bb5988 (patch)
tree21122c18c9d9b5644167cdc1dc43f5181a54fe9f /markdown_extensions/codehilite.py
parent41f4e32e758ab3642b5e110db220f6a0f24b2ba4 (diff)
downloadmarkdown-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.py5
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: