back-dollar-quoted-argument: Don't consider comma a hex character.
Character class syntax does not ignore commas between ranges.
This commit is contained in:
parent
69fcb40275
commit
78ad649d47
@ -312,11 +312,11 @@ _zsh_highlight_main_highlighter_highlight_dollar_string()
|
|||||||
case "$arg[$i]" in
|
case "$arg[$i]" in
|
||||||
"\\") style=$ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]
|
"\\") style=$ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]
|
||||||
for (( c = i + 1 ; c < end_pos - start_pos ; c += 1 )); do
|
for (( c = i + 1 ; c < end_pos - start_pos ; c += 1 )); do
|
||||||
[[ "$arg[$c]" != ([0-9,xX,a-f,A-F]) ]] && break
|
[[ "$arg[$c]" != ([0-9xXa-fA-F]) ]] && break
|
||||||
done
|
done
|
||||||
AA=$arg[$i+1,$c-1]
|
AA=$arg[$i+1,$c-1]
|
||||||
# Matching for HEX and OCT values like \0xA6, \xA6 or \012
|
# Matching for HEX and OCT values like \0xA6, \xA6 or \012
|
||||||
if [[ "$AA" =~ "^(0*(x|X)[0-9,a-f,A-F]{1,2})" || "$AA" =~ "^(0[0-7]{1,3})" ]];then
|
if [[ "$AA" =~ "^(0*(x|X)[0-9a-fA-F]{1,2})" || "$AA" =~ "^(0[0-7]{1,3})" ]];then
|
||||||
(( k += $#MATCH ))
|
(( k += $#MATCH ))
|
||||||
(( i += $#MATCH ))
|
(( i += $#MATCH ))
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user