Skip to content

Commit

Permalink
Update main-highlighter.zsh
Browse files Browse the repository at this point in the history
Comments added
  • Loading branch information
Shura0 committed Aug 9, 2013
1 parent 8abcf18 commit a7ee059
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions highlighters/main/main-highlighter.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,18 @@ _zsh_highlight_main_highlighter_highlight_string()
[[ "$arg[$c]" != ([0-9,xX,a-f,A-F]) ]] && break
done
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
(( k += $#MATCH ))
(( i += $#MATCH ))
else
(( k += 1 )) # Color following char too.
(( i += 1 )) # Skip parsing the escaped char.
fi
(( varflag = 0 ))
(( varflag = 0 )) # End of variable
;;
([^a-zA-Z0-9_]))
(( varflag = 0 ))
(( varflag = 0 )) # End of variable
continue
;;
*) [[ $varflag -eq 0 ]] && continue ;;
Expand Down

0 comments on commit a7ee059

Please sign in to comment.