X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;ds=inline;f=cgilite%2Fmarkdown.awk;h=ffa225b477f6e8ff3dd1b157bc0f6e715df0a494;hb=4b293f028acf3cd3b2417a9c5b19c3faac24fb13;hp=506d22d08474b5f4a14dc5953c1dda121f4b9678;hpb=295a04b184bb6cd427c35c58f88d3d35a0552ed8;p=shellwiki diff --git a/cgilite/markdown.awk b/cgilite/markdown.awk index 506d22d..ffa225b 100755 --- a/cgilite/markdown.awk +++ b/cgilite/markdown.awk @@ -380,7 +380,7 @@ function _block( block, LOCAL, st, len, hlvl, htxt, sec, guard, code, indent, at } else if ( match( block, /^> /) ) { match( block, /(^|\n)[[:space:]]*(\n|$)/ ) || match(block, /$/); len = RLENGTH; st = RSTART; - return "
\n" _nblock( gensub( /(^|\n)> /, "\n", "g", substr(block, 1, st - 1) ) ) "\n\n" \ + return "
" gensub( /^\n|\n$/, "", "g", _nblock( gensub( /(^|\n)> /, "\n", "g", substr(block, 1, st - 1) ) ) ) "\n\n" \ _block( substr(block, st + len) ); # Pipe Tables (pandoc / php md / gfm )