aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Takhteyev <yuri@freewisdom.org>2008-07-01 23:24:50 -0700
committerYuri Takhteyev <yuri@freewisdom.org>2008-07-01 23:24:50 -0700
commit2edd84eac6d419f7a20f779fbe120dd76ca195a8 (patch)
tree1460e29de5d0bf2271790bb9100bf94469dc0bfc
parentbb00fc58cf0e08c07c5705c55cf7c9d5dcf94595 (diff)
downloadmarkdown-2edd84eac6d419f7a20f779fbe120dd76ca195a8.tar.gz
markdown-2edd84eac6d419f7a20f779fbe120dd76ca195a8.tar.bz2
markdown-2edd84eac6d419f7a20f779fbe120dd76ca195a8.zip
Switching to simpler non-printable placeholders.
-rw-r--r--markdown.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/markdown.py b/markdown.py
index 0b1e325..b141757 100644
--- a/markdown.py
+++ b/markdown.py
@@ -110,9 +110,8 @@ EXECUTABLE_NAME_FOR_USAGE = "python markdown.py"
# a template for html placeholders
START = u'\u0001'
END = u'\u0002'
-NULL = u'\u0001'
-HTML_PLACEHOLDER_PREFIX = START+"html"+NULL
-HTML_PLACEHOLDER = HTML_PLACEHOLDER_PREFIX + "%d"+END+"html"+NULL
+HTML_PLACEHOLDER_PREFIX = START+"html:"
+HTML_PLACEHOLDER = HTML_PLACEHOLDER_PREFIX + "%d"+END
BLOCK_LEVEL_ELEMENTS = ['p', 'div', 'blockquote', 'pre', 'table',
'dl', 'ol', 'ul', 'script', 'noscript',
@@ -1955,8 +1954,8 @@ class Markdown:
# Fixup the source text
- for controlChar in (START, END, NULL) :
- self.source = self.source.replace(controlChar, "")
+ self.source = self.source.replace(START, "")
+ self.source = self.source.replace(END, "")
self.source = self.source.replace("\r\n", "\n").replace("\r", "\n")
self.source += "\n\n"