Skip to content
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

Multiline flag does not work with re.match #1388

Conversation

alanhamlett
Copy link
Contributor

Replace re.match with re.search whenever the re.MULTILINE / re.M flag is present. Fixes #1056.

@alanhamlett alanhamlett force-pushed the regex-search-does-not-work-with-multiline branch from bb73f33 to 7a22f54 Compare February 8, 2020 16:09
@Anteru
Copy link
Collaborator

Anteru commented Feb 9, 2020

Merged, thanks -- nice find!

@Anteru Anteru merged commit ae94e15 into pygments:master Feb 9, 2020
@Anteru Anteru added this to the 2.6 milestone Feb 9, 2020
@alanhamlett alanhamlett deleted the regex-search-does-not-work-with-multiline branch February 9, 2020 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

re.match causes re.MULTILINE to be a noop
2 participants