From 3705198654599232dad7ec73dbf0fe2fd4ca5cc1 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 23 Mar 2025 09:20:43 -0300 Subject: src/htmlbody: Use tidy(1) to indent htmlbody snippets by 4 blocks --- src/htmlbody | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/htmlbody b/src/htmlbody index e4e5692..1e31751 100755 --- a/src/htmlbody +++ b/src/htmlbody @@ -23,4 +23,11 @@ plaintext_links() { }' "$1" } -plaintext_links "$FILENAME" | asciidoctor -s - +indent_4_blocks() { + printf '
%s
' "$(cat -)" | + tidy -quiet -indent -xml | + head -n -4 | + tail -n +5 +} + +plaintext_links "$FILENAME" | asciidoctor -s - | indent_4_blocks -- cgit v1.2.3