diff options
author | Waylan Limberg <waylan@gmail.com> | 2008-11-20 19:38:09 -0500 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2008-11-20 19:38:09 -0500 |
commit | 517d38e552e91ebbe527a0286d43dd1daa585bcc (patch) | |
tree | 24056de7d71aa3018a6b32237df22e71d2128af2 /markdown/postprocessors.py | |
parent | 41ebca604f081d1bb798d3178f674e960a2e4ec1 (diff) | |
download | markdown-517d38e552e91ebbe527a0286d43dd1daa585bcc.tar.gz markdown-517d38e552e91ebbe527a0286d43dd1daa585bcc.tar.bz2 markdown-517d38e552e91ebbe527a0286d43dd1daa585bcc.zip |
Cleaned up recent refactor into a package from a single file.
Diffstat (limited to 'markdown/postprocessors.py')
-rw-r--r-- | markdown/postprocessors.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/markdown/postprocessors.py b/markdown/postprocessors.py index cd872cf..80227bb 100644 --- a/markdown/postprocessors.py +++ b/markdown/postprocessors.py @@ -1,3 +1,13 @@ +""" +POST-PROCESSORS +============================================================================= + +Markdown also allows post-processors, which are similar to preprocessors in +that they need to implement a "run" method. However, they are run after core +processing. + +""" + import markdown @@ -42,9 +52,11 @@ class RawHtmlPostprocessor(Postprocessor): else: html = markdown.HTML_REMOVED_TEXT if safe or not self.markdown.safeMode: - text = text.replace("<p>%s</p>" % (markdown.linepreprocessors.HTML_PLACEHOLDER % i), - html + "\n") - text = text.replace(markdown.linepreprocessors.HTML_PLACEHOLDER % i, html) + text = text.replace("<p>%s</p>" % + (markdown.preprocessors.HTML_PLACEHOLDER % i), + html + "\n") + text = text.replace(markdown.preprocessors.HTML_PLACEHOLDER % i, + html) return text def escape(self, html): |