summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2021-09-27 20:31:28 +0200
committerDaniel Schadt <kingdread@gmx.de>2021-09-27 20:32:46 +0200
commit97d9be790d3ebeaeb266f9c9cc0320a8e791cd10 (patch)
tree0858e06ab23237723fd59fc7a548c01906b0ff17
parente01af462a38254b4f7afda88f1f1e88cd4a2cd72 (diff)
downloadwikimini-more-tests.tar.gz
wikimini-more-tests.tar.bz2
wikimini-more-tests.zip
remove walrusmore-tests
This makes wikimini work with Python below 3.8.
-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())