mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
back-dollar-quoted-argument: Highlight incomplete escape sequences as unknown-token
Followup to 219184f046, which fixed issue #196.
This commit is contained in:
parent
f657406159
commit
6488284814
2 changed files with 8 additions and 2 deletions
|
|
@ -29,12 +29,14 @@
|
|||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]=$unused_highlight
|
||||
BUFFER=": \$'foo\xbar\udeadbeef'"
|
||||
BUFFER=": \$'foo\xbar\udeadbeef\uzzzz'"
|
||||
|
||||
expected_region_highlight=(
|
||||
"3 7 $ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]" # $'foo
|
||||
"8 11 $ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]" # \xba
|
||||
"12 12 $ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]" # r
|
||||
"13 18 $ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]" # \dead
|
||||
"19 23 $ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]" # beef'
|
||||
"19 22 $ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]" # beef
|
||||
"23 24 $ZSH_HIGHLIGHT_STYLES[unknown-token]" # \u
|
||||
"25 29 $ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]" # zzzz'
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue