From ba74f8bde87dada9ecb046a122529c551ddc3322 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 15 Apr 2025 08:22:29 -0300 Subject: src/adoc: Add `fix_header_anchor_position()` stage --- src/adoc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/adoc b/src/adoc index bb47807..468b3aa 100755 --- a/src/adoc +++ b/src/adoc @@ -46,6 +46,10 @@ plaintext_links() { }' } +fix_header_anchor_position() { + sed 's|^\(

\)\(.*\)\(

\)$|\1\3\2\4|' +} + runtidy() { statusconv 1:0 tidy \ -quiet \ @@ -65,6 +69,7 @@ indent_4_blocks() { } cat "$FILENAME" | - plaintext_links | - asciidoctor -s - | + plaintext_links | + asciidoctor -s - | + fix_header_anchor_position | indent_4_blocks -- cgit v1.2.3