From a7ee0597ef696ef8f79af31f36ff8997b80e2368 Mon Sep 17 00:00:00 2001 From: Shura Date: Fri, 9 Aug 2013 10:24:14 +0400 Subject: [PATCH] Update main-highlighter.zsh Comments added --- highlighters/main/main-highlighter.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index d7f04d2..dbe48da 100755 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -181,6 +181,7 @@ _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 )) @@ -188,10 +189,10 @@ _zsh_highlight_main_highlighter_highlight_string() (( 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 ;;