-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Escape posix bracket #23
Comments
Thanks for the report. I've previously seen your report at kkos/oniguruma#253 but the details are a little hard to follow. The current handling in If I want to follow the handling from the latest version of Oniguruma (6.9.10), can you clarify what the change should be? |
I see so VSCode allows escaping posix brackets |
That said, it's helpful to have this documented here in case future versions of |
Although you're already aware of this @RedCMD, I'll note for other people that the changes in behavior for existing syntax between Oniguruma v6.9.8 (currently used by VS Code, Shiki, etc.) and Oniguruma v6.9.10 are extremely minor and are unlikely to cause problems for even a single TextMate grammar. And, of course, escaping POSIX classes in the obvious way (ex: If there were ever meaningful differences (that affected real grammars) between the version of Oniguruma used by VS Code and the latest Oniguruma, |
Thank you so much for such a great tool! The following is an explanation of Oniguruma 6.9.9 issue253. The regular expressions that follow are written in Below are examples of the case where it becomes Below are examples of the case where there are interpreted as standard nested classes. And, Oniguruma test file (test/test_utf8.c) The above determination is made by the following code: The above code can be expressed as a regular expression as follows:
If it doesn't match the regular expression above, it's standard nested classes. For the benefit of your users, you can treat edge cases as errors.
Not Unicode Case: alpha alphabet Unicode Case: alpha Alphabetic ex. In the case of In Oniguruma 6.9.9 and 6.9.10, there is no 'Character limit' for POSIX bracket validation. In 6.9.8, this limit was About The subject of Oniguruma issue 253 is the following behavior.
These In 6.9.8, to avoid this bug, change [Edit] However, The patterns affected by this bug and its fixes are extremely rare.
P.S. The demo of oniguruma-to-es (Now: ver 2.1.0) |
@tonco-miyazawa THANK YOU for the fantastic explanation, details, and examples! 🙇🏻♂️ I believe this is fixed now, but of course feel free to let me know if anything is still wrong. Thanks to both you and @RedCMD for bringing your attention to detail and Oniguruma expertise to help improve this library. |
Fix published in v3.0.0. |
Posix bracket can be escaped
details of posix bracket were changed in v6.9.9 #253
[[:-\:]]
matches:
The text was updated successfully, but these errors were encountered: