#---*- Makefile -*-------------------------------------------------------
#$Author: saulius $
#$Date: 2019-03-07 15:33:31 +0000 (Thu, 07 Mar 2019) $
#$Revision: 184 $
#$URL: svn+ssh://saulius-grazulis.lt/home/saulius/svn-repositories/makefiles/htmltidy/Makelocal-htmltidy $
#------------------------------------------------------------------------

HTML = ${wildcard *.html}

tidy:
	for i in ${HTML}; do ( \
	    set -x; \
	    mv -f $$i $$i~; \
	    tidy -qi -utf8 \
	        $$i~ \
	    | perl -000 -pe \
	        's/\$$Id:(.*)\$$/"\n  \$$Id:" . \
	           (eval{$$a=$$1, $$a=~s,\s*\n\s*, ,g, $$a}) . \
	           "\$$\n  "/esm' \
	    > $$i; \
	) done
