]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rule to check for non-ASCII characters.
authorAlan T. DeKok <aland@freeradius.org>
Wed, 11 Feb 2026 16:32:52 +0000 (11:32 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 11 Feb 2026 17:12:45 +0000 (12:12 -0500)
while smart quotes are nice, ASCII is nicer. And emdashes are bad.

Add additional rule to clean up non-ASCII characters

doc/all.mk

index 0d836f841bdb7b753651df9fb3ef8181e6ac0328..7c80ede967fca63c887fa1971d73a360964e4895 100644 (file)
@@ -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