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
|
|
@ -332,6 +332,10 @@ _zsh_highlight_main_highlighter_highlight_dollar_string()
|
|||
(( k += $#MATCH ))
|
||||
(( i += $#MATCH ))
|
||||
else
|
||||
if (( $#arg > $i+1 )) && [[ $arg[$i+1] == [xXuU] ]]; then
|
||||
# \x not followed by hex digits is probably an error
|
||||
style=$ZSH_HIGHLIGHT_STYLES[unknown-token]
|
||||
fi
|
||||
(( k += 1 )) # Color following char too.
|
||||
(( i += 1 )) # Skip parsing the escaped char.
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue