X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=markdown.awk;h=a50f7a2253cf0b3ca52798d819380602e454fcd1;hb=c4ba9cc2baf2fb79323279203b4e1694100ecabe;hp=7d7e0a5f56d5e70b7e0be4d1d104164a5718b13b;hpb=2ea88f760e5b796c42e6cd9c2237fc4b26a26e20;p=cgilite diff --git a/markdown.awk b/markdown.awk index 7d7e0a5..a50f7a2 100755 --- a/markdown.awk +++ b/markdown.awk @@ -93,6 +93,7 @@ function URL ( text ) { gsub( /&/, "%26", text ); gsub( /"/, "%22", text ); gsub( /'/, "%27", text ); + gsub( /`/, "%60", text ); gsub( /\?/, "%3F", text ); gsub( /#/, "%23", text ); gsub( /\[/, "%5B", text ); @@ -115,8 +116,8 @@ function inline( line, LOCAL, len, code, href, guard ) { return ""; # omit processing of escaped characters - } else if ( line ~ /^\\[]\\`\*_\{\}\(\)#\+-\.![]/) { - return substr(line, 2, 1) inline( substr(line, 3) ); + } else if ( line ~ /^\\./) { + return HTML(substr(line, 2, 1)) inline( substr(line, 3) ); # hard brakes } else if ( match(line, /^ \n/) ) {