Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commite20d42ec5cc4b1b90f2cdade175004bf4bf155fa (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-01-01 11:27:18 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-01-01 11:27:18 +0200
Files3480667739bbf5c66c5c6991053e8c7df866441d
csg-e20d42ec5cc4b1b90f2cdade175004bf4bf155fa.tar
csg-e20d42ec5cc4b1b90f2cdade175004bf4bf155fa.tar.gz
csg-e20d42ec5cc4b1b90f2cdade175004bf4bf155fa.zip
Parentcb0086df08c5b4712c2eddd200d957be744529f0 (diff)
fix(single): Make inline html logic properly handle indentation
1 files changed, 8 insertions, 1 deletions
-rw-r--r--single.awk9
diff --git a/single.awk b/single.awk
index d47dc43..cc80c46 100644
--- a/single.awk
+++ b/single.awk
@@ -115,7 +115,14 @@ BEGIN {
# Inline HTML
/^[ \t]*<\/?[0-9A-Za-z]+/ {
- _next()
+ match($0, /^[ \t]*/)
+ if (last_html || RLENGTH - 2 * list_level < 4) {
+ last_html = 1
+ _next()
+ }
+}
+{
+ last_html = 0
}
# Link definition