From: Paul Hänsch Date: Sun, 20 Aug 2023 14:05:52 +0000 (+0200) Subject: Squashed 'cgilite/' changes from 854547d4..1cf0dab1 X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=be3b0b1f0ea6b499b79122bcf159b5a2d7d92228;p=shellwiki Squashed 'cgilite/' changes from 854547d4..1cf0dab1 1cf0dab1 markdown: avoid adding newlines to blockquote, css: style for blockquote git-subtree-dir: cgilite git-subtree-split: 1cf0dab1d218582457bce9c839e845b920fecee0 --- diff --git a/common.css b/common.css index be1567b..51feb2e 100644 --- a/common.css +++ b/common.css @@ -47,6 +47,13 @@ b, strong { font-weight: bolder; } tt, code, var, samp, kbd { font-family: monospace; } kbd { font-style: italic; } +blockquote { + background-color: #EEE; + margin: .5em 0; + padding: 1em 2em; + white-space: pre-line; +} + ul, ol { padding-left: 1.125em; } dl dt { font-weight: bolder; } table th { font-weight: bold; } diff --git a/markdown.awk b/markdown.awk index 506d22d..ffa225b 100755 --- a/markdown.awk +++ b/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 )