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 for ut.block counting a close character within a regex #39

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

SirXavierC
Copy link
Contributor

Other variations of this problem could surface with similar code changes and so a fully robust solution is needed for the long term.

= added 2 commits August 18, 2022 09:09
…. Solved by not counting close character when followed by a /. This is not the most robust solution as other combinations of open/close characters within regex structures could trigger a similar error.
@gatecrasher777
Copy link
Owner

I think the block function is always going to be subject to breaking. I've rewritten the extraction code for the next update so that it only looks for the beginning and end signatures of the required block and uses the pinch function instead of traversing the code. In that way, it doesn't matter what obstacles are placed in between. The only thing that can then break is if they change the start and end signatures. Nothing is perfect, but less code is better code.

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