0
0
mirror of https://github.com/vim/vim.git synced 2025-10-09 06:14:17 -04:00

runtime(vim): Update base-syntax, highlight literal string quote escape

Match the '' escape sequence in literal strings.  These were previously
ending the current string and starting another concatenated literal
string.

closes: #16415

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
Doug Kearns
2025-01-10 20:02:17 +01:00
committed by Christian Brabandt
parent 51754c8a49
commit 695522dea3
9 changed files with 104 additions and 64 deletions

View File

@@ -21,6 +21,15 @@ echo "\<*C->>"
echo "\<C->>>"
echo "\<*C->>>"
echo ''''
echo '''foo'
echo 'foo'''
echo 'foo''bar'
" Unreported issue (incorrectly matches as vimString vimMark vimOper NONE)
" https://github.com/tpope/vim-unimpaired/blob/6d44a6dc2ec34607c41ec78acf81657248580bf1/plugin/unimpaired.vim#L232
let cmd = 'put!=repeat(nr2char(10), v:count1)|silent '']+'
" String interpolation
echo 'Don''t highlight interpolation: {{ {1 + 2} }}'
@@ -30,6 +39,11 @@ echo $'Highlight interpolation:\t{{ { $'nested: {{ {1 + 2} }}' } }}'
echo $"Highlight interpolation:\t{{ { string({"foo": "bar"}) } }}"
echo $"Highlight interpolation:\t{{ { $"nested: {{ {1 + 2} }}" } }}"
echo $''''
echo $'''foo'
echo $'foo'''
echo $'foo''bar'
" Number
" Hexadecimal