diff options
author | Waylan Limberg <waylan@gmail.com> | 2008-10-19 22:30:03 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2008-10-19 22:30:03 -0400 |
commit | 15224bd352bc6c06ae05ffd78d5ecee9ea07f6ef (patch) | |
tree | fb762121f0529a15fe09dc831f3dc75d269b30d4 /markdown_extensions/footnotes.py | |
parent | c6e6f944773ee7ee2926b43dda4cdabd6f9a5058 (diff) | |
download | markdown-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/footnotes.py')
-rw-r--r-- | markdown_extensions/footnotes.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/markdown_extensions/footnotes.py b/markdown_extensions/footnotes.py index 39379f3..2b5795d 100644 --- a/markdown_extensions/footnotes.py +++ b/markdown_extensions/footnotes.py @@ -60,11 +60,11 @@ class FootnoteExtension (markdown.Extension): md.inlinePatterns.add("footnote", FootnotePattern(FOOTNOTE_RE, self), "<reference") - # Insert a post-processor that would actually add the footnote div - md.postprocessors.add("footnote", FootnotePostprocessor(self), + # Insert a tree-processor that would actually add the footnote div + md.treeprocessors.add("footnote", FootnoteTreeprocessor(self), "_end") - md.textPostprocessors.add("footnote", FootnoteTextPostprocessor(self), + md.postprocessors.add("footnote", FootnotePostprocessor(self), ">amp_substitute") def reset(self) : @@ -216,7 +216,7 @@ class FootnotePattern (markdown.Pattern) : a.text = str(num) return sup -class FootnotePostprocessor (markdown.Postprocessor): +class FootnoteTreeprocessor (markdown.Treeprocessor): def __init__ (self, footnotes) : self.footnotes = footnotes @@ -239,7 +239,7 @@ class FootnotePostprocessor (markdown.Postprocessor): else : root.append(footnotesDiv) -class FootnoteTextPostprocessor (markdown.Postprocessor): +class FootnotePostprocessor (markdown.Postprocessor): def run(self, text) : return text.replace(FN_BACKLINK_TEXT, "↩") |