Skip to content

Commit bdaadf7

Browse files
committed
do not auto multiline match for string patterns
1 parent 3beda7d commit bdaadf7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tatsu/buffering.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ def _scanre(self, pattern):
357357
if isinstance(pattern, RETYPE):
358358
cre = pattern
359359
else:
360-
cre = re.compile(pattern, re.MULTILINE)
360+
cre = re.compile(pattern)
361361
return cre.match(self.text, self.pos)
362362

363363
@property

test/grammar/pattern_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def test_patterns_with_newlines(self):
2222
2323
blankline
2424
=
25-
/^[^\\n]*\\n$/
25+
/(?m)^[^\\n]*\\n$/
2626
;
2727
"""
2828

0 commit comments

Comments
 (0)