Update main-highlighter.zsh
Comments added
This commit is contained in:
parent
8abcf187f6
commit
a7ee0597ef
@ -181,6 +181,7 @@ _zsh_highlight_main_highlighter_highlight_string()
|
|||||||
[[ "$arg[$c]" != ([0-9,xX,a-f,A-F]) ]] && break
|
[[ "$arg[$c]" != ([0-9,xX,a-f,A-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
|
||||||
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-9,a-f,A-F]{1,2})" || "$AA" =~ "^(0[0-7]{1,3})" ]];then
|
||||||
(( k += $#MATCH ))
|
(( k += $#MATCH ))
|
||||||
(( i += $#MATCH ))
|
(( i += $#MATCH ))
|
||||||
@ -188,10 +189,10 @@ _zsh_highlight_main_highlighter_highlight_string()
|
|||||||
(( k += 1 )) # Color following char too.
|
(( k += 1 )) # Color following char too.
|
||||||
(( i += 1 )) # Skip parsing the escaped char.
|
(( i += 1 )) # Skip parsing the escaped char.
|
||||||
fi
|
fi
|
||||||
(( varflag = 0 ))
|
(( varflag = 0 )) # End of variable
|
||||||
;;
|
;;
|
||||||
([^a-zA-Z0-9_]))
|
([^a-zA-Z0-9_]))
|
||||||
(( varflag = 0 ))
|
(( varflag = 0 )) # End of variable
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
*) [[ $varflag -eq 0 ]] && continue ;;
|
*) [[ $varflag -eq 0 ]] && continue ;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user