]> git.plutz.net Git - cgilite/blobdiff - markdown.awk
allow dashes in metadata names
[cgilite] / markdown.awk
index 7e29c572213e553df07563099cf52683ed11b960..c08d856da87c1e3a1b30ea4d3b8a212bfa6856d2 100755 (executable)
@@ -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) );