Summary Files Commits Branches @commit @diff @stats
path: root / single.awk
diff options
context:
space:
mode:
Commita132e1ba8480edd7f4efc80b02b5f91064b572a5 (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-12-31 10:29:11 +0200
Committer
 Syndamia <kamen@syndamia.com>
2024-12-31 10:29:11 +0200
Files8a5bf33eab5c15924f68df44beb8da5034e6ce5c /single.awk
csg-a132e1ba8480edd7f4efc80b02b5f91064b572a5.tar
csg-a132e1ba8480edd7f4efc80b02b5f91064b572a5.tar.gz
csg-a132e1ba8480edd7f4efc80b02b5f91064b572a5.zip
Parent77226b4f56a25cb9b791f93b0d9cea66f3b1ff46 (diff)
fix(single): Flatten identation of list items
1 files changed, 3 insertions, 1 deletions
-rw-r--r--single.awk4
diff --git a/single.awk b/single.awk
index 2ac29cf..00f9e2e 100644
--- a/single.awk
+++ b/single.awk
@@ -244,7 +244,9 @@ function abs(x) { return ((x < 0) ? -x : x) }
else {
println("</li><li>")
}
- $0 = substr($0, RSTART + RLENGTH)
+}
+!blankline && lengthStack("list-level") > 0 {
+ $0 = substr($0, abs(topStack("list-level")) + 1)
}
# Paragraphs