[vim/vim] runtime(sh): fix spurious nextgroup=shComment on shEscape (PR #19414)

0 views
Skip to first unread message

Bozhidar Batsov

unread,
4:14 AM (4 hours ago) 4:14 AM
to vim/vim, Subscribed

The shEscape pattern had nextgroup=shComment, which caused #
characters appearing after an escape sequence inside double-quoted
strings to be misinterpreted as comment starts. For example:

FILENAME=$(sed -r -e "s#[:/]+#\.#g" -e "s#[^a-zA-Z0-9\._]*##g" <<<${CLEANURL})

Here \. matches shEscape, then nextgroup=shComment makes Vim
treat the following #g" as a comment, breaking highlighting for the
rest of the file.

Removing nextgroup=shComment fixes the issue without regressing any
existing syntax tests. A new test case (sh_15) is included.

Closes #19053


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19414

Commit Summary

  • a970fbc runtime(sh): fix spurious nextgroup=shComment on shEscape

File Changes

(3 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19414@github.com>

Reply all
Reply to author
Forward
0 new messages