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

Tests: Added regex test #1847

Merged
merged 1 commit into from
Apr 22, 2019
Merged

Conversation

RunDevelopment
Copy link
Member

This PR adds a test which will fail if any of the regexes in any language match the empty string.
Patterns which match the empty string can create an infinite number of empty tokens.

This is a followup of #1775.

This does not include a test for lookbehinds and lookaheads. I actually implemented it and not only did it not find any more patterns which match the empty string, it even found a false positive: the specifier pattern of AsciiDoc.

Copy link
Contributor

@Golmote Golmote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! This looks great. Thanks for working on this.

@RunDevelopment RunDevelopment merged commit c1e6a7f into PrismJS:master Apr 22, 2019
@RunDevelopment RunDevelopment deleted the regex-test branch April 22, 2019 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants