Skip to content

Commit 1c160ef

Browse files
committed
Ensure inlinepatterns iterate through elements in document order
1 parent 5d7f8ca commit 1c160ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

markdown/treeprocessors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def run(self, tree: etree.Element, ancestors: list[str] | None = None) -> etree.
368368
stack = [(tree, tree_parents)]
369369

370370
while stack:
371-
currElement, parents = stack.pop()
371+
currElement, parents = stack.pop(0)
372372

373373
self.ancestors = parents
374374
self.__build_ancestors(currElement, self.ancestors)

0 commit comments

Comments
 (0)