From ca22f379dcbc2047479fd165d56f8c5c938dac43 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Paul=20H=C3=A4nsch?=
Date: Wed, 30 Aug 2023 00:37:43 +0200
Subject: [PATCH] fix: block nesting in lists
---
markdown.awk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/markdown.awk b/markdown.awk
index 91a7956..5915f01 100755
--- a/markdown.awk
+++ b/markdown.awk
@@ -763,7 +763,7 @@ function _list (block, mark, LOCAL, len, st, text, indent, task) {
match( text, /^\[[xX]\]/) ? "" : "";
sub(/^\[[-? /xX]\]/, "", text);
- text = _block( text );
+ text = _nblock( text );
if (match( text, "^(
]|[^p]|<[^/]|[^<])*
\n$" ))
gsub( "(^|
\n$)", "", text);
@@ -786,7 +786,7 @@ function _dlist (block, LOCAL, len, st, text, indent, p) {
sub( "^ ? ? ?:(\t| +)", "", text);
gsub( "(^|\n) {0," indent "}", "\n", text );
- text = _block(text);
+ text = _nblock(text);
if (match( text, "^(
]|[^p]|<[^/]|[^<])*\n$" ))
gsub( "(^|
\n$)", "", text);
--
2.39.2