summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2024-03-12 10:34:16 +0100
committerJonas Smedegaard <dr@jones.dk>2024-03-12 10:34:16 +0100
commit3c65ad8bc3824e11d1a1880df612ed96ce55a9da (patch)
treea1fa413a6f5e1b1649bd3e0f0a32e8b48cc0b00e
parentb1134b747559fddd08a5732fb8e269c607f4de65 (diff)
fix word count to tolerate trailing text
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
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 \