aboutsummaryrefslogtreecommitdiffstats
path: root/markdown_extensions/toc.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2008-10-19 22:30:03 -0400
committerWaylan Limberg <waylan@gmail.com>2008-10-19 22:30:03 -0400
commit15224bd352bc6c06ae05ffd78d5ecee9ea07f6ef (patch)
treefb762121f0529a15fe09dc831f3dc75d269b30d4 /markdown_extensions/toc.py
parentc6e6f944773ee7ee2926b43dda4cdabd6f9a5058 (diff)
downloadmarkdown-15224bd352bc6c06ae05ffd78d5ecee9ea07f6ef.tar.gz
markdown-15224bd352bc6c06ae05ffd78d5ecee9ea07f6ef.tar.bz2
markdown-15224bd352bc6c06ae05ffd78d5ecee9ea07f6ef.zip
Changed Postprocessors to Treeprocessors and TextPostProcessors to Postprocessors. These names more acturately depict what things do. Also updated the extensions and docs to match.
Diffstat (limited to 'markdown_extensions/toc.py')
-rw-r--r--markdown_extensions/toc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/markdown_extensions/toc.py b/markdown_extensions/toc.py
index ccc927c..00cf537 100644
--- a/markdown_extensions/toc.py
+++ b/markdown_extensions/toc.py
@@ -12,7 +12,7 @@ import markdown
from markdown import etree
import re
-class TocPostprocessor (markdown.Postprocessor):
+class TocTreeprocessor (markdown.Treeprocessor):
# Iterator wrapper to get parent and child all at once
def iterparent(self, root):
for parent in root.getiterator():
@@ -119,9 +119,9 @@ class TocExtension (markdown.Extension):
return re.sub('[-\s]+','-',value)
def extendMarkdown(self, md, md_globals) :
- tocext = TocPostprocessor(md)
+ tocext = TocTreeprocessor(md)
tocext.config = self.config
- md.postprocessors.add("toc", tocext, "_begin")
+ md.treeprocessors.add("toc", tocext, "_begin")
def makeExtension(configs={}) :
return TocExtension(configs=configs)