summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wikimini/document.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/wikimini/document.py b/wikimini/document.py
index 6d8e873..7036f67 100644
--- a/wikimini/document.py
+++ b/wikimini/document.py
@@ -292,7 +292,11 @@ class Paragraph(Block):
# (mainly if their text also contains links, in which case it'd require
# multiple parsing passes). As a quick and dirty fix, we just delete
# that stuff here:
- while match := re.search("\\[\\[\\w+:.+?\\]\\]", self.plain()):
+ match = None
+ while True:
+ match = re.search("\\[\\[\\w+:.+?\\]\\]", self.plain())
+ if not match:
+ break
start_node, start_pos = self._find_index(match.start())
end_node, end_pos = self._find_index(match.end())