diff options
author | Artem Yunusov <nedrlab@gmail.com> | 2008-08-02 04:08:13 +0500 |
---|---|---|
committer | Artem Yunusov <nedrlab@gmail.com> | 2008-08-02 04:08:13 +0500 |
commit | e54a1868b38c53073eb54df313962a105819b03e (patch) | |
tree | 9710069e572ed8e743be4a01096579a5e15f4ad4 /markdown.py | |
parent | 13d25f86f61bbce247a12b845c3675b57274a13e (diff) | |
download | markdown-e54a1868b38c53073eb54df313962a105819b03e.tar.gz markdown-e54a1868b38c53073eb54df313962a105819b03e.tar.bz2 markdown-e54a1868b38c53073eb54df313962a105819b03e.zip |
Some other extensions ported to ElementTree, litle bugfix in core.
Diffstat (limited to 'markdown.py')
-rwxr-xr-x | markdown.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/markdown.py b/markdown.py index 12fd70d..b5903f5 100755 --- a/markdown.py +++ b/markdown.py @@ -1203,6 +1203,8 @@ class Markdown: ] self.inlineStash = InlineStash() + + self._inlineOperationID = None self.registerExtensions(extensions = extensions, configs = extension_configs) @@ -1630,6 +1632,7 @@ class Markdown: """ startIndex = 0 + while patternIndex < len(self.inlinePatterns): data, matched, startIndex = self._applyInline( @@ -1637,7 +1640,6 @@ class Markdown: data, patternIndex, startIndex) if not matched: patternIndex += 1 - return data def _applyInline(self, pattern, data, patternIndex, startIndex=0): @@ -1656,14 +1658,12 @@ class Markdown: Returns: String with placeholders. """ - match = pattern.getCompiledRegExp().match(data[startIndex:]) leftData = data[:startIndex] if not match: return data, False, 0 - node = pattern.handleMatch(match) if node is None: @@ -1676,7 +1676,7 @@ class Markdown: if not isstr(node): if child.text: child.text = self._handleInline(child.text, - patternIndex) + patternIndex + 1) if child.tail: child.tail = self._handleInline(child.tail, patternIndex) |