Fix: Convert variable-length lookbehinds to PCRE-compatible form#128
Fix: Convert variable-length lookbehinds to PCRE-compatible form#128Chocapikk wants to merge 1 commit intojeff-hykin:masterfrom
Conversation
|
are you sure PCRE doesn't support out of all of them with the actual change being very small (the rest of the warnings are just broken even https://regex101.com/r/6uHp7M/1 agrees |
bf0b7bd to
a94e5da
Compare
|
You're right. I over-fixed this - PCRE handles top-level variable-length lookbehinds by auto-splitting them. The only actual issue is in I've force-pushed with just that single change. Thanks for catching this. |
a94e5da to
12409cc
Compare
- Unwrap non-capturing group in normal_statement lookbehind for PCRE compatibility: (?<=(?:^|...)) -> (?<=^|...) - Fix broken include references: #arithmetic_dollar -> #arithmetic_no_dollar #line_continuation_character -> #line_continuation
12409cc to
993c048
Compare


Summary
Fix PCRE-incompatible lookbehind and two broken include references.
Changes
PCRE compatibility
The
normal_statement.beginregex wraps lookbehind alternatives in a non-capturing group, which prevents PCRE from auto-splitting:Broken includes
Two include references point to non-existent repository keys:
#arithmetic_dollar->#arithmetic_no_dollar(fixes arithmetic scoping in interpolation)#line_continuation_character->#line_continuation(fixes backslash continuation in comments)Why
There is a PR on github-linguist/linguist to replace the archived
atom/language-shellscriptgrammar withbetter-shell-syntaxfor GitHub.com syntax highlighting. These fixes are required for that integration.