aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2007-11-05 04:18:52 +0000
committerWaylan Limberg <waylan@gmail.com>2007-11-05 04:18:52 +0000
commit966689b9f17c28854d00d275743e8ea2eb77bd94 (patch)
tree824fef8b98d67698f7374bfe90635cdac1417995
parent5289a6abbb7aba4feac015cc27057c88a2fbcb75 (diff)
downloadmarkdown-966689b9f17c28854d00d275743e8ea2eb77bd94.tar.gz
markdown-966689b9f17c28854d00d275743e8ea2eb77bd94.tar.bz2
markdown-966689b9f17c28854d00d275743e8ea2eb77bd94.zip
Cleaned up doc string and code for RawHtmlTextPreprocessor.
-rw-r--r--markdown.py18
1 files 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