diff options
author | Waylan Limberg <waylan@gmail.com> | 2010-07-06 14:09:02 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2010-07-06 14:09:02 -0400 |
commit | 2b6754adb0f43e1853726f2c936dbf81c1b40736 (patch) | |
tree | 8a34ee9497053a89b67cefb18e4197649220951d /markdown/postprocessors.py | |
parent | 543027d73f2d9bf66fc8b56c18acfd1c987b1a8d (diff) | |
download | markdown-2b6754adb0f43e1853726f2c936dbf81c1b40736.tar.gz markdown-2b6754adb0f43e1853726f2c936dbf81c1b40736.tar.bz2 markdown-2b6754adb0f43e1853726f2c936dbf81c1b40736.zip |
Moved HtmlStash and base Prosessor classes to the new util module.
Diffstat (limited to 'markdown/postprocessors.py')
-rw-r--r-- | markdown/postprocessors.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/markdown/postprocessors.py b/markdown/postprocessors.py index 4ce5324..b4b36de 100644 --- a/markdown/postprocessors.py +++ b/markdown/postprocessors.py @@ -8,16 +8,9 @@ processing. """ - import util -import preprocessors - -class Processor: - def __init__(self, markdown_instance=None): - if markdown_instance: - self.markdown = markdown_instance -class Postprocessor(Processor): +class Postprocessor(util.Processor): """ Postprocessors are run after the ElementTree it converted back into text. @@ -55,9 +48,9 @@ class RawHtmlPostprocessor(Postprocessor): html = util.HTML_REMOVED_TEXT if safe or not self.markdown.safeMode: text = text.replace("<p>%s</p>" % - (preprocessors.HTML_PLACEHOLDER % i), + (util.HTML_PLACEHOLDER % i), html + "\n") - text = text.replace(preprocessors.HTML_PLACEHOLDER % i, + text = text.replace(util.HTML_PLACEHOLDER % i, html) return text |