From: Paul Hänsch Date: Wed, 20 Mar 2024 10:57:19 +0000 (+0100) Subject: allow dashes in metadata names X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=6c558265e3db741077c1356d46fe6e7e904dc814;p=cgilite allow dashes in metadata names --- diff --git a/markdown.awk b/markdown.awk index 7e29c57..c08d856 100755 --- a/markdown.awk +++ b/markdown.awk @@ -391,7 +391,7 @@ function _block( block, LOCAL, st, len, text, title, attrib, href, guard, code, # Metadata (custom, block starting with %something) # Metadata is ignored but can be interpreted externally - } else if ( match(block, /^%[a-zA-Z]+([[:space:]][^\n]*)?(\n|$)(%[a-zA-Z]+([[:space:]][^\n]*)?(\n|$)|%([[:space:]][^\n]*)?(\n|$)|[ \t]+[^\n[:space:]][^\n]*(\n|$))*/) ) { + } else if ( match(block, /^%[a-zA-Z-]+([[:space:]][^\n]*)?(\n|$)(%[a-zA-Z-]+([[:space:]][^\n]*)?(\n|$)|%([[:space:]][^\n]*)?(\n|$)|[ \t]+[^\n[:space:]][^\n]*(\n|$))*/) ) { len = RLENGTH; st = RSTART; return _block( substr( block, len + 1) );