aboutsummaryrefslogtreecommitdiffstats
path: root/markdown.py
diff options
context:
space:
mode:
authorArtem Yunusov <nedrlab@gmail.com>2008-08-02 04:08:13 +0500
committerArtem Yunusov <nedrlab@gmail.com>2008-08-02 04:08:13 +0500
commite54a1868b38c53073eb54df313962a105819b03e (patch)
tree9710069e572ed8e743be4a01096579a5e15f4ad4 /markdown.py
parent13d25f86f61bbce247a12b845c3675b57274a13e (diff)
downloadmarkdown-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-xmarkdown.py8
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)