mirror of
https://github.com/zsh-users/zsh-syntax-highlighting
synced 2024-12-19 01:44:37 +00:00
back-dollar-quoted-argument: Don't consider \0xHH a hex escape sequence.
A leading zero is not permitted in the '\xHH' syntax.
This commit is contained in:
parent
78ad649d47
commit
98366ade11
@ -316,7 +316,7 @@ _zsh_highlight_main_highlighter_highlight_dollar_string()
|
||||
done
|
||||
AA=$arg[$i+1,$c-1]
|
||||
# Matching for HEX and OCT values like \0xA6, \xA6 or \012
|
||||
if [[ "$AA" =~ "^(0*(x|X)[0-9a-fA-F]{1,2})" || "$AA" =~ "^(0[0-7]{1,3})" ]];then
|
||||
if [[ "$AA" =~ "^((x|X)[0-9a-fA-F]{1,2})" || "$AA" =~ "^(0[0-7]{1,3})" ]];then
|
||||
(( k += $#MATCH ))
|
||||
(( i += $#MATCH ))
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user