Skip to content

Commit

Permalink
do not auto multiline match for string patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
vfazio committed Dec 27, 2024
1 parent 3beda7d commit bdaadf7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tatsu/buffering.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/grammar/pattern_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_patterns_with_newlines(self):
blankline
=
/^[^\\n]*\\n$/
/(?m)^[^\\n]*\\n$/
;
"""

Expand Down

0 comments on commit bdaadf7

Please sign in to comment.