summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-01-20 13:30:27 -0500
committerJune McEnroe <june@causal.agency>2021-01-20 13:30:27 -0500
commit3968224ad89128d743d92c5b121479d6dd67b6c5 (patch)
tree9b01101b1103c745d7be1196643a7746e002d5a7
parentPrefer tag matches not preceded by [[:alnum:]] (diff)
downloadsrc-3968224ad89128d743d92c5b121479d6dd67b6c5.tar.gz
src-3968224ad89128d743d92c5b121479d6dd67b6c5.zip
Avoid matching ':' in make tags
Otherwise a :: rule includes one of the ':'s in the tag name.
-rw-r--r--bin/mtags.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mtags.c b/bin/mtags.c
index db66f1d4..55257088 100644
--- a/bin/mtags.c
+++ b/bin/mtags.c
@@ -53,7 +53,7 @@ int main(int argc, char *argv[]) {
 		|| regcomp(&makeFile, "(^|/)Makefile|[.]mk$", REG_EXTENDED | REG_NOSUB)
 		|| regcomp(
 			&makeLine,
-			"^([.][^$A-Z][^$[:space:]]*|[^.$][^$[:space:]]*):",
+			"^([.][^:$A-Z][^:$[:space:]]*|[^.:$][^:$[:space:]]*):",
 			REG_EXTENDED
 		)
 		|| regcomp(&mdocFile, "[.][1-9]$", REG_EXTENDED | REG_NOSUB)