Summary Files Commits Branches @commit @diff @stats
path: root / single.awk
diff options
context:
space:
mode:
Commitaf26f19f4ce34efce2e5e35a68d814e8b067c917 (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-12-31 11:23:44 +0200
Committer
 Syndamia <kamen@syndamia.com>
2024-12-31 11:23:44 +0200
Fileseb497d246eb267319f250aa1ee6200cf0f4ddd55 /single.awk
csg-af26f19f4ce34efce2e5e35a68d814e8b067c917.tar
csg-af26f19f4ce34efce2e5e35a68d814e8b067c917.tar.gz
csg-af26f19f4ce34efce2e5e35a68d814e8b067c917.zip
Parent573da3af1d9eaec45dad88622458950a94bf9ed9 (diff)
fix(single): Improve formatting of definition lists
1 files changed, 2 insertions, 1 deletions
-rw-r--r--single.awk3
diff --git a/single.awk b/single.awk
index b60535f..0d402fd 100644
--- a/single.awk
+++ b/single.awk
@@ -338,10 +338,11 @@ function surround(brace, opening, closing, blen, single_surround) {
surround("`" , "<code>" , "</code>")
}
+# Definition lists
!prev_blankline && /^: / {
sub(/^<p>/, "", prev)
sub(/^: /, "")
- prev = "<dl><dt>" prev "</dt>" ORS "<dd>" $0 "</dd></dl>"
+ prev = "<dl><dt>" ORS prev ORS "</dt><dd>" ORS $0 ORS "</dd></dl>"
blankline = 1
next
}