From 71de6234b23a22b2ceee6252fe6d2fa843afeaa8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 7 Jul 2025 05:50:05 +0200 Subject: [PATCH] use attributes in wrapper class for fenced code blocks --- markdown.awk | 3 ++- tests-markdown.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/markdown.awk b/markdown.awk index 90dddbf..60599af 100755 --- a/markdown.awk +++ b/markdown.awk @@ -657,7 +657,8 @@ function _block( block, LOCAL, st, len, text, title, attrib, href, guard, code, gsub(/(^ | $)/, "", attrib); if ( match(code, "(^|\n)" guard "+(\n|$)" ) && attrib ) { len = RLENGTH; st = RSTART; - ret = ret "
" HTML( substr(code, 1, st - 1) ) "
\n"; + ret = ret "
" \
+                        HTML( substr(code, 1, st - 1) ) "
\n"; block = substr( code, st + len ); continue; diff --git a/tests-markdown.sh b/tests-markdown.sh index 6df4224..30442cc 100755 --- a/tests-markdown.sh +++ b/tests-markdown.sh @@ -185,7 +185,7 @@ not be *formatted* but ­ ```' \ -'
fenced code will
+'
fenced code will
 not be
 *formatted*
 but &shy; <escaped>
' \ @@ -762,7 +762,7 @@ list item.


-
Fenced Code Block
+
Fenced Code Block
 # with verbatim Text
 `and an attribute`
The limerick packs laughs anatomical
-- 2.39.5