From: Sergey Matveev Date: Tue, 15 Mar 2022 10:17:17 +0000 (+0300) Subject: More strict regexp X-Git-Url: http://www.git.stargrave.org/?p=zk.zsh.git;a=commitdiff_plain;h=8fb9357a06cc80fa4d06de752edf094d82ae8824 More strict regexp --- diff --git a/zk.zsh b/zk.zsh index baa1296..25a3036 100755 --- a/zk.zsh +++ b/zk.zsh @@ -36,7 +36,7 @@ typeset -aU words for p (${(k)pages}) { words=() for w (${=mapfile[$p]}) { - [[ $w =~ "\[(.*)\]" ]] || continue + [[ $w =~ "\[([^] ]+)\]" ]] || continue w=${match[1]} [[ ${pages[$w]} ]] || { [[ $ZK_SHOW_MISSING ]] && print "missing $w"