-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable multiline regexp mode for patterm matcher #861
Conversation
Sorry for multiple commits, it seems that it's not squashed on my side |
SGTM but please add a test :) |
@mvdan test added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Not sure how you ended up there. Can you try squashing and rebasing your commits? |
Ah, ignore me, I can squash-merge. |
In the case of pattern comparison with the multiline string, an incorrect result may occur when the matched substring appears in the not first line.
Example:
returns 1 because generated regexp
^.*/etc/apache2.*$
(interp/runner.go, func match()) is not multiline enabled.this patch adds the
(?m)
flag into all autogenerated regexps in this function.