Markdown input: Fix handling of very large files. Fixes #1212330 [Markdown converter produces garbled output on large files](https://bugs.launchpad.net/calibre/+bug/1212330)

This commit is contained in:
Kovid Goyal 2014-02-03 08:03:08 +05:30
parent 91e12f10ca
commit aea318aaee

View File

@ -36,7 +36,7 @@ STX = '\u0002' # Use STX ("Start of text") for start-of-placeholder
ETX = '\u0003' # Use ETX ("End of text") for end-of-placeholder
INLINE_PLACEHOLDER_PREFIX = STX+"klzzwxh:"
INLINE_PLACEHOLDER = INLINE_PLACEHOLDER_PREFIX + "%s" + ETX
INLINE_PLACEHOLDER_RE = re.compile(INLINE_PLACEHOLDER % r'([0-9]{4})')
INLINE_PLACEHOLDER_RE = re.compile(INLINE_PLACEHOLDER % r'([0-9]+)')
AMP_SUBSTITUTE = STX+"amp"+ETX
"""