mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
Highlight backslash escapes within $'' strings.
Correct highlighting of backslash escapes within "" strings: highlight only the four specific escape sequences defined there. Fixes zsh-users/zsh-syntax-highlighting#196.
This commit is contained in:
parent
f4164ac86c
commit
69fcb40275
5 changed files with 75 additions and 5 deletions
|
|
@ -29,7 +29,7 @@
|
|||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
BUFFER=': "foo$bar:\`:\":\$:'
|
||||
BUFFER+=\\\':\"
|
||||
BUFFER+=\\\\:\"
|
||||
|
||||
expected_region_highlight=(
|
||||
"3 6 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # "foo
|
||||
|
|
@ -41,6 +41,6 @@ expected_region_highlight=(
|
|||
"17 17 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # :
|
||||
"18 19 $ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]" # \"
|
||||
"20 20 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # :
|
||||
"21 22 $ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]" # \'
|
||||
"21 22 $ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]" # \\
|
||||
"23 24 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # :"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue