diff options
author | EuAndreh <eu@euandre.org> | 2025-03-23 09:20:43 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-03-23 09:20:43 -0300 |
commit | 3705198654599232dad7ec73dbf0fe2fd4ca5cc1 (patch) | |
tree | c9c765bde60ec02c6af2907197c691c6e12b43a4 | |
parent | src/conf: Do not error on missing title (diff) | |
download | mkwb-3705198654599232dad7ec73dbf0fe2fd4ca5cc1.tar.gz mkwb-3705198654599232dad7ec73dbf0fe2fd4ca5cc1.tar.xz |
src/htmlbody: Use tidy(1) to indent htmlbody snippets by 4 blocks
-rwxr-xr-x | src/htmlbody | 9 |
1 files changed, 8 insertions, 1 deletions
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 '<div><div><div><div>%s</div></div></div></div>' "$(cat -)" | + tidy -quiet -indent -xml | + head -n -4 | + tail -n +5 +} + +plaintext_links "$FILENAME" | asciidoctor -s - | indent_4_blocks |