From 55f37ea9d62b1f580935a277d36a698f78e9d12f Mon Sep 17 00:00:00 2001 From: Robert Oostenveld Date: Wed, 7 Feb 2024 15:32:33 +0100 Subject: [PATCH] FIX #765 - do whole-word search for tags --- _scripts/tags.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_scripts/tags.sh b/_scripts/tags.sh index 0d95b7cc4..168dd259d 100755 --- a/_scripts/tags.sh +++ b/_scripts/tags.sh @@ -27,7 +27,7 @@ done # this constructs a list of pages that have a certain tag for TAG in `cat ${TAGFILE}` ; do - FILELIST=`find . -name \*.md | xargs grep -l ^tags:.*${TAG} | sort | uniq ` + FILELIST=`find . -name \*.md | xargs grep -wl ^tags:.*${TAG} | sort | uniq ` for FILE in ${FILELIST}; do NAME=`grep title: $FILE | cut -d : -f 2 | cut -b 2-` LINK=${FILE:1:$((${#FILE}-4))}