diff --git a/tatsu/buffering.py b/tatsu/buffering.py index 87358d99..5a2a91fd 100644 --- a/tatsu/buffering.py +++ b/tatsu/buffering.py @@ -357,7 +357,7 @@ def _scanre(self, pattern): if isinstance(pattern, RETYPE): cre = pattern else: - cre = re.compile(pattern, re.MULTILINE) + cre = re.compile(pattern) return cre.match(self.text, self.pos) @property diff --git a/test/grammar/pattern_test.py b/test/grammar/pattern_test.py index 91094fad..c651baf3 100644 --- a/test/grammar/pattern_test.py +++ b/test/grammar/pattern_test.py @@ -22,7 +22,7 @@ def test_patterns_with_newlines(self): blankline = - /^[^\\n]*\\n$/ + /(?m)^[^\\n]*\\n$/ ; """