From 0187e255a811bebb0dad3624f2c6d78b829d15c5 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 17 Jan 2023 16:15:28 +0200 Subject: [awk] Reworked generation to happen via a combined script, updated scripts and added info in scripts readme --- awk-edits/Group-contents.awk | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 awk-edits/Group-contents.awk (limited to 'awk-edits/Group-contents.awk') diff --git a/awk-edits/Group-contents.awk b/awk-edits/Group-contents.awk new file mode 100644 index 0000000..d984eef --- /dev/null +++ b/awk-edits/Group-contents.awk @@ -0,0 +1,20 @@ +# +# == About == +# +# This script surrounds the "Contents" heading, as well as the list itself, in a div wrapper element +# For it to work properly, the contents heading must be h2 and have it's id as "contents", +# and there must be a paragraph element after the item list + +BEGIN { + started = 0 +} + +/h2 id="contents"/ { + print "
" + started = 1 +} + +started == 1 && /

/ { + print "

" + started = 0 +} -- cgit v1.3.1-26-gb76a