From 331df45fa7a05ad94e835a013f88042159e29a89 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Mon, 17 Oct 2016 06:54:11 +0200 Subject: [PATCH] =?UTF-8?q?*highlight:=20Better=20indexing=20detection=20i?= =?UTF-8?q?n=20variables=20=E2=80=93=20use=20[^\]]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hsmw-highlight | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hsmw-highlight b/hsmw-highlight index c7c4b6d..52e9b63 100644 --- a/hsmw-highlight +++ b/hsmw-highlight @@ -669,7 +669,7 @@ typeset -gA HSMW_HIGHLIGHT_STYLES local mybuf="$arg" integer idx=start_pos end_idx - while [[ "$mybuf" = (#b)[^\$\\]#((\$[a-zA-Z0-9_]##(\[[^[:space:]]#\])(#c0,1))|(\$[{](\([a-zA-Z0@%#]##\))(#c0,1)[a-zA-Z0-9_]##(\[[^[:space:]]#\])(#c0,1)[}])|[\\][\'\"\$]|[\\](*))(*) ]]; do + while [[ "$mybuf" = (#b)[^\$\\]#((\$[a-zA-Z0-9_]##(\[[^\]]#\])(#c0,1))|(\$[{](\([a-zA-Z0@%#]##\))(#c0,1)[a-zA-Z0-9_]##(\[[^\]]#\])(#c0,1)[}])|[\\][\'\"\$]|[\\](*))(*) ]]; do [[ -n "${match[7]}" ]] && { idx+=${mbegin[1]} mybuf="${match[7]}"