# HG changeset patch # User Paul Boddie # Date 1633378681 -7200 # Node ID c5adfaa499f8c4ccd856aea421c5dc0ed7e75f7c # Parent ccba949fbb689242ccd6018d22bb3c5e6642af88 Unset residual match details, also using match_group to update the stream position when failing to match in a region. diff -r ccba949fbb68 -r c5adfaa499f8 moinformat/parsers/common.py --- a/moinformat/parsers/common.py Sun Oct 03 17:52:57 2021 +0200 +++ b/moinformat/parsers/common.py Mon Oct 04 22:18:01 2021 +0200 @@ -169,6 +169,7 @@ self.queued = None else: self.matching = None + self.match = None # Find the first matching pattern. @@ -194,6 +195,9 @@ return self.s[self.pos:] else: return None + + # Return the preceding text, requiring the match to be retrieved. + else: self.groups = self.filter_groups() return self.s[self.pos:self.start] @@ -481,6 +485,7 @@ # End of input. if not self.matching_pattern(): + self.match_group() break # Obtain any feature.