diff options
author | Daniel Schadt <kingdread@gmx.de> | 2021-09-27 20:31:28 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2021-09-27 20:32:46 +0200 |
commit | 97d9be790d3ebeaeb266f9c9cc0320a8e791cd10 (patch) | |
tree | 0858e06ab23237723fd59fc7a548c01906b0ff17 | |
parent | e01af462a38254b4f7afda88f1f1e88cd4a2cd72 (diff) | |
download | wikimini-97d9be790d3ebeaeb266f9c9cc0320a8e791cd10.tar.gz wikimini-97d9be790d3ebeaeb266f9c9cc0320a8e791cd10.tar.bz2 wikimini-97d9be790d3ebeaeb266f9c9cc0320a8e791cd10.zip |
remove walrusmore-tests
This makes wikimini work with Python below 3.8.
-rw-r--r-- | wikimini/document.py | 6 |
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()) |