From 6531915524d7814aca52668659c4ebdfb50b922b Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Sun, 2 Feb 2014 13:07:30 -0500 Subject: No longer restrict INLUNE_PLACEHOLDER to 4 digits. This was limiting the parser to only 10,000 placeholders (0-9999) per document. removing this limitation allows longer documents ot be parsered correctly. Fixes #255. --- markdown/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown/util.py b/markdown/util.py index 8c2e6d7..882c413 100644 --- a/markdown/util.py +++ b/markdown/util.py @@ -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 HTML_PLACEHOLDER = STX + "wzxhzdk:%s" + ETX HTML_PLACEHOLDER_RE = re.compile(HTML_PLACEHOLDER % r'([0-9]+)') -- cgit v1.2.3