From: Paul Hänsch Date: Tue, 31 May 2022 19:14:05 +0000 (+0200) Subject: Squashed 'cgilite/' changes from d09c1c1..d1bb79c X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=8ed7045912937148dd46554178e675df8493f46c;p=shellwiki Squashed 'cgilite/' changes from d09c1c1..d1bb79c d1bb79c bugfix in recognition of fenced code block attributes git-subtree-dir: cgilite git-subtree-split: d1bb79cc914d707553de40a9b146265ac0f6b577 --- 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|$)" ) ) {