From bf72e27ad845a3c4376c475dd129b6f1bb8b3832 Mon Sep 17 00:00:00 2001 From: Joseph Graham Date: Tue, 30 Sep 2014 13:23:13 +0100 Subject: Fixed annoying bug in footnotes. It no longer matches unless the filename matches right to the start of a word boundry. --- hack_of_all_hacks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack_of_all_hacks b/hack_of_all_hacks index 989593f..f2d9e0a 100644 --- a/hack_of_all_hacks +++ b/hack_of_all_hacks @@ -393,7 +393,7 @@ EOF declare -l lowersentence="${sentence}" - if [[ "${lowersentence}" =~ ${filename}[\ ]?\[[[:digit:]]\] ]] + if [[ " ${lowersentence}" =~ [^[:alnum:]]${filename}[\ ]?\[[[:digit:]]\] ]] then index="${BASH_REMATCH: -2:1}" -- cgit v1.2.3