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

Fix complex pattern hanging forever #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

polqf
Copy link

@polqf polqf commented Feb 27, 2023

This PR fixes an issue where a complex pattern would hang forever, and never return, leaving an app in a complete freeze.
The string is **~*~~~*~*~**~*~* h e a r d ***~*~*~**~*~~~*

The library would detect the initial ~~~ pattern as the start of a tag, and the one at the end as the end of it. But the closeTag method would never return as remainingTags would never reach 0.

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.

1 participant