diff options
author | Yuri Takhteyev <yuri@freewisdom.org> | 2008-07-01 23:24:50 -0700 |
---|---|---|
committer | Yuri Takhteyev <yuri@freewisdom.org> | 2008-07-01 23:24:50 -0700 |
commit | 2edd84eac6d419f7a20f779fbe120dd76ca195a8 (patch) | |
tree | 1460e29de5d0bf2271790bb9100bf94469dc0bfc /markdown.py | |
parent | bb00fc58cf0e08c07c5705c55cf7c9d5dcf94595 (diff) | |
download | markdown-2edd84eac6d419f7a20f779fbe120dd76ca195a8.tar.gz markdown-2edd84eac6d419f7a20f779fbe120dd76ca195a8.tar.bz2 markdown-2edd84eac6d419f7a20f779fbe120dd76ca195a8.zip |
Switching to simpler non-printable placeholders.
Diffstat (limited to 'markdown.py')
-rw-r--r-- | markdown.py | 9 |
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" |