From 730f8461002d6562856c8f636c1b5cd7d8a2c638 Mon Sep 17 00:00:00 2001 From: Leon Rische Date: Mon, 2 Nov 2020 14:03:32 +0100 Subject: Better tag regex --- awk/index.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awk/index.awk b/awk/index.awk index 6caf408..29c982c 100644 --- a/awk/index.awk +++ b/awk/index.awk @@ -69,7 +69,7 @@ match($0, /^(\*+)[ \t]+(.*)$/, a) { # this only guarantees that there is at least one tab/space # between the headline text and the tags. # TODO: Do this in a single match - if (match(title, /^(.*)[ \t]+(:([a-zA-Z0-9_@#%]+:)+)$/, b) != 0) { + if (match(title, /^(.*)[ \t]+(:([[:alnum:]_@#%]+:)+)$/, b) != 0) { title = b[1]; # remove trailing tabs/spaces sub(/[ \t]*$/, "", title); -- cgit v1.2.3