From 3c65ad8bc3824e11d1a1880df612ed96ce55a9da Mon Sep 17 00:00:00 2001
From: Jonas Smedegaard <dr@jones.dk>
Date: Tue, 12 Mar 2024 10:34:16 +0100
Subject: fix word count to tolerate trailing text

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b5b2756..2a5dd64 100644
--- a/Makefile
+++ b/Makefile
@@ -78,7 +78,7 @@ $(ARTICLES:%=screening-of-%): screening-of-%:
 $(ARTICLES:%=wordcount-of-%): wordcount-of-%:
 	QUARTO_LOG_LEVEL=quiet \
 	quarto render $*/index.qmd --to plain --columns=9999 --output - \
-	| perl -nE 'next if /^-*$$/; $$bilag += $$_ eq "Bilag 1\n"; $$chars += length unless $$bilag; END { say $$chars }'
+	| perl -nE 'next if /^-*$$/; $$bilag += $$_ =~ "^Bilag 1\\b"; $$chars += length unless $$bilag; END { say $$chars }'
 
 $(ARTICLES:%=turtle-from-%): turtle-from-%: _site/%/index.pdf
 	@bin/xmp2rdfxml _site/$*/index.pdf \
-- 
cgit v1.2.3