From: Alan T. DeKok Date: Wed, 11 Feb 2026 16:32:52 +0000 (-0500) Subject: rule to check for non-ASCII characters. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c065b20ecb4dd25cae0ff2fdde3dabdc7fd8e89f;p=thirdparty%2Ffreeradius-server.git rule to check for non-ASCII characters. while smart quotes are nice, ASCII is nicer. And emdashes are bad. Add additional rule to clean up non-ASCII characters --- diff --git a/doc/all.mk b/doc/all.mk index 0d836f841bd..7c80ede967f 100644 --- a/doc/all.mk +++ b/doc/all.mk @@ -268,6 +268,20 @@ doc/man/%.1: doc/man/%.adoc asciidoc: $(ADOC_FILES) docsite: build/docsite/sitemap.xml +# +# OSX: pcregrep --color +# Linux: grep --color='auto' -P -n +# + +.PHONY: doc.ascii +doc.ascii: + @pcregrep --color '[\x80-\xFF]' $$(find doc/antora -name "*.adoc" -print) + +.PHONY: doc.fixascii +doc.fixascii: + @perl -p -i -e "s,‘,',g;s,’,',g;s,–,-,g;s,—,-,g;s, , ,g;s:…:,:g;s,“,\",g;s,”,\",g;s,≤,<=,g;s,≥,>=,g;s,→,->,g" $$(find doc/antora -name "*.adoc" -print) + + doc: build/docsite/sitemap.xml # end of WITH_DOC