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:
@@ -29,10 +29,12 @@
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
BUFFER=': "$" "$42foo"'
|
||||
BUFFER+=\ \"\\\'\\x\"
|
||||
|
||||
expected_region_highlight=(
|
||||
"3 5 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # "$"
|
||||
"7 7 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # "
|
||||
"8 10 $ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]" # $42
|
||||
"11 14 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # foo"
|
||||
"16 21 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # "\'\x" - \' and \x are not escape sequences
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user