summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-04-03 11:18:13 -0300
committerEuAndreh <eu@euandre.org>2025-04-03 11:18:13 -0300
commite2657f8d130be1dc7200b694c8c574b886f7f122 (patch)
treefd574889d1035ae13fc40a0bdea49140640bce32
parentsrc/htmlbody: indent as HTML instead of XML (diff)
downloadmkwb-e2657f8d130be1dc7200b694c8c574b886f7f122.tar.gz
mkwb-e2657f8d130be1dc7200b694c8c574b886f7f122.tar.xz
src/htmlbody: Simply redirect to adoc(1)
-rwxr-xr-xsrc/htmlbody23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/htmlbody b/src/htmlbody
index d24aa2a..48d6734 100755
--- a/src/htmlbody
+++ b/src/htmlbody
@@ -10,25 +10,4 @@ FILENAME="${1:-}"
eval "$(assert-arg -- "$FILENAME" 'FILENAME.adoc')"
-plaintext_links() {
- awk -v BASE="$(basename "$FILENAME" .adoc)".html l'
- { print }
- /^----$/ {
- in_block = !in_block
- if (in_block) {
- next
- }
- file = BASE "." count++ ".txt"
- print "[role=plaintext]"
- print "link:" file "[plaintext]"
- }' "$1"
-}
-
-indent_4_blocks() {
- printf '<div><div><div><div>%s</div></div></div></div>' "$(cat -)" |
- tidy -quiet -indent --show-body-only yes |
- head -n -4 |
- tail -n +5
-}
-
-plaintext_links "$FILENAME" | asciidoctor -s - | indent_4_blocks
+exec adoc -sxn4 "$FILENAME"