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

Detect multiline patterns in velocity lexer text analysis #1776

Merged
merged 1 commit into from Apr 17, 2021

Conversation

dron22
Copy link
Contributor

@dron22 dron22 commented Apr 16, 2021

The existing implementation of VelocityLexer text analysis did not take into account, that template directives macro, foreach and if usually stretch over multiple lines.

This PR adds re.DOTALL flag to the re.search call in text analysis of VelocityLexer to detect multi-line directives. Unit tests are included.

@Anteru Anteru merged commit ded8b70 into pygments:master Apr 17, 2021
@Anteru
Copy link
Collaborator

Anteru commented Apr 17, 2021

Merged, thanks!

@dron22
Copy link
Contributor Author

dron22 commented Apr 20, 2021

@Anteru Happy to contribute to this great project 👍

@Anteru Anteru added the changelog-update Items which need to get mentioned in the changelog label Apr 24, 2021
@Anteru Anteru self-assigned this Apr 24, 2021
@Anteru Anteru added this to the 2.9 milestone Apr 24, 2021
@Anteru Anteru removed the changelog-update Items which need to get mentioned in the changelog label May 2, 2021
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.

None yet

2 participants