summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-04-15 07:57:26 -0300
committerEuAndreh <eu@euandre.org>2025-04-15 07:57:26 -0300
commite9c8a59d49b52e07c8c19357e5d7b2961879677d (patch)
tree15e7f1a8c1d30a22e7dacee40efb7fd2d2804dcc
parentsrc/adoc: Add (unused) getops options (diff)
downloadadoc-e9c8a59d49b52e07c8c19357e5d7b2961879677d.tar.gz
adoc-e9c8a59d49b52e07c8c19357e5d7b2961879677d.tar.xz
src/adoc: Rewrite as a pipeline with cat(1) at the start
-rwxr-xr-xsrc/adoc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/adoc b/src/adoc
index b52dd60..bb47807 100755
--- a/src/adoc
+++ b/src/adoc
@@ -43,7 +43,7 @@ plaintext_links() {
file = BASE "." count++ ".txt"
print "[role=plaintext]"
print "link:" file "[plaintext]"
- }' "$1"
+ }'
}
runtidy() {
@@ -64,4 +64,7 @@ indent_4_blocks() {
tail -n +5
}
-plaintext_links "$FILENAME" | asciidoctor -s - | indent_4_blocks
+cat "$FILENAME" |
+ plaintext_links |
+ asciidoctor -s - |
+ indent_4_blocks