From e20d42ec5cc4b1b90f2cdade175004bf4bf155fa Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 1 Jan 2025 11:27:18 +0200 Subject: fix(single): Make inline html logic properly handle indentation --- single.awk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- cgit v1.3.1-23-gd82d