From 966689b9f17c28854d00d275743e8ea2eb77bd94 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Mon, 5 Nov 2007 04:18:52 +0000 Subject: Cleaned up doc string and code for RawHtmlTextPreprocessor. --- markdown.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/markdown.py b/markdown.py index 211ccfd..c150b1f 100644 --- a/markdown.py +++ b/markdown.py @@ -889,6 +889,21 @@ class Postprocessor : pass +""" +====================================================================== +======================== TEXT-POST-PROCESSORS ======================== +====================================================================== + +Markdown also allows text-post-processors, which are similar to +textpreprocessors in that they need to implement a "run" method. +Unlike post-processors, they take a text string as a parameter and +should return a string. + +Text-Post-Processors should extend markdown.Postprocessor. + +""" + + class RawHtmlTextPostprocessor(Postprocessor) : def __init__(self): @@ -896,8 +911,7 @@ class RawHtmlTextPostprocessor(Postprocessor) : def run(self, text): for i in range(self.stash.html_counter) : - html = self.stash.rawHtmlBlocks[i][0] - safe = self.stash.rawHtmlBlocks[i][1] + html, safe = self.stash.rawHtmlBlocks[i] if self.safeMode and not safe: html = HTML_REMOVED_TEXT -- cgit v1.2.3