From 98366ade118e16e2a831602493a38fd40ec31cc9 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 25 Sep 2015 21:36:20 +0000 Subject: [PATCH] back-dollar-quoted-argument: Don't consider \0xHH a hex escape sequence. A leading zero is not permitted in the '\xHH' syntax. --- highlighters/main/main-highlighter.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 2222943..77d7785 100755 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -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