From: Paul Hänsch Date: Tue, 31 May 2022 19:13:47 +0000 (+0200) Subject: bugfix in recognition of fenced code block attributes X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=d1bb79cc914d707553de40a9b146265ac0f6b577;p=cgilite bugfix in recognition of fenced code block attributes --- diff --git a/markdown.awk b/markdown.awk index 4ef7645..540292c 100755 --- a/markdown.awk +++ b/markdown.awk @@ -337,7 +337,7 @@ function _block( block, LOCAL, st, len, hlvl, htxt, guard, code, indent, attrib } else if ( match( block, /^(~~~+|```+)/ ) ) { guard = substr( block, 1, RLENGTH ); code = gensub(/^[^\n]+\n/, "", 1, block); - attrib = gensub(/^:::+[ \t]*\{?[ \t]*([^\}\n]*)\}?[ \t]*\n.*$/, "\\1", 1, block); + attrib = gensub(/^(~~~+|```+)[ \t]*\{?[ \t]*([^\}\n]*)\}?[ \t]*\n.*$/, "\\2", 1, block); gsub(/[^a-zA-Z0-9_-]+/, " ", attrib); gsub(/(^ | $)/, "", attrib); if ( match(code, "(^|\n)" guard "+(\n|$)" ) ) {