aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2008-10-13 13:25:50 -0400
committerWaylan Limberg <waylan@gmail.com>2008-10-13 13:25:50 -0400
commitddbf2a32bb8d2de79b1b12478e1a66b8ff3893eb (patch)
treee004cb1650315b8c68d8b703c89407d96ec23b9f
parentd55e2f8168c7d0f3c1ed331184b58fbaa87e990e (diff)
downloadmarkdown-ddbf2a32bb8d2de79b1b12478e1a66b8ff3893eb.tar.gz
markdown-ddbf2a32bb8d2de79b1b12478e1a66b8ff3893eb.tar.bz2
markdown-ddbf2a32bb8d2de79b1b12478e1a66b8ff3893eb.zip
Updated CodeHilite extension to work with recent refactor. Feels a little hacky though.
-rw-r--r--markdown_extensions/codehilite.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/markdown_extensions/codehilite.py b/markdown_extensions/codehilite.py
index 7f4a1a8..b3c8d52 100644
--- a/markdown_extensions/codehilite.py
+++ b/markdown_extensions/codehilite.py
@@ -193,7 +193,7 @@ class CodeHiliteExtention(markdown.Extension):
def extendMarkdown(self, md, md_globals):
- def _hiliteCodeBlock(parent_elem, lines, inList):
+ def __hiliteCodeBlock(parent_elem, lines, inList):
"""
Overrides `_processCodeBlock` method in standard Markdown class
and sends code blocks to a code highlighting proccessor. The result
@@ -208,7 +208,7 @@ class CodeHiliteExtention(markdown.Extension):
"""
- detabbed, theRest = md.detectTabbed(lines)
+ detabbed, theRest = md.parser.detectTabbed(lines)
text = "\n".join(detabbed).rstrip()+"\n"
code = CodeHilite(text, linenos=self.config['force_linenos'][0],
css_class=self.config['css_class'][0])
@@ -216,9 +216,9 @@ class CodeHiliteExtention(markdown.Extension):
# This wrapping p element will be removed when inserting raw html
p = markdown.etree.SubElement(parent_elem, 'p')
p.text = placeholder
- md._processSection(parent_elem, theRest, inList)
+ md.parser.parseChunk(parent_elem, theRest, inList)
- md._processCodeBlock = _hiliteCodeBlock
+ md.parser._MarkdownParser__processCodeBlock = __hiliteCodeBlock
def makeExtension(configs={}):
return CodeHiliteExtention(configs=configs)