X-Git-Url: https://git.plutz.net/?p=cgilite;a=blobdiff_plain;f=markdown.awk;h=65e0aefe2bd3ed4da3f4d3a543cc12511c31b4f9;hp=361e6005c3fc42fa5e1f81859d69ec59d0c0a138;hb=882f37daf3eac1ee8589eb623ec3bc4cfc3c7e9f;hpb=1d27862fc4c0ced76afb8bdfa04a9ab0f50208ef diff --git a/markdown.awk b/markdown.awk index 361e600..65e0aef 100755 --- a/markdown.awk +++ b/markdown.awk @@ -227,6 +227,11 @@ function inline( line, LOCAL, len, code, href, guard ) { len = RLENGTH; return "" inline( substr( line, 2, len - 2 ) ) "" inline( substr( line, len + 1 ) ); + # Macros + } else if ( AllowMacros && match( line, /^<<([^>]|>[^>])+>>/) ) { + len = RLENGTH; + return macro( substr( line, 3, len - 4 ) ) inline(substr(line, len + 1)); + # Verbatim inline HTML } else if ( AllowHTML && match( line, /^(|<\?([^\?]|\?[^>])*\?>|]*>|])*\]\]>|<\/[A-Za-z][A-Za-z0-9-]*[[:space:]]*>|<[A-Za-z][A-Za-z0-9-]*([[:space:]]+[A-Za-z_:][A-Za-z0-9_\.:-]*([[:space:]]*=[[:space:]]*([[:space:]"'=<>`]+|"[^"]*"|'[^']*'))?)*[[:space:]]*\/?>)/) ) { len = RLENGTH;