From: Paul Hänsch Date: Sun, 25 Jul 2021 02:52:49 +0000 (+0200) Subject: Merge commit '0062e5835b9a5aa82e017c446a1bd54f1d9d7e2b' X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=HEAD;hp=-c;p=webtxt Merge commit '0062e5835b9a5aa82e017c446a1bd54f1d9d7e2b' --- b8fe70c9614c1b9405301874193e3dfc5206f354 diff --combined cgilite/markdown.awk index 512be5d,361e600..361e600 --- a/cgilite/markdown.awk +++ b/cgilite/markdown.awk @@@ -274,11 -274,6 +274,6 @@@ function _block( block, LOCAL, st, len } else if ( AllowHTML && match( block, /^ ? ? ?(<\/[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:]]*\/?>)([[:space:]]*\n)([^\n]|\n[ \t]*[^\n])*(\n[[:space:]]*\n|$)/) ) { len = RLENGTH; st = RSTART; return substr(block, st, len) _block(substr(block, st + len)); - - # Horizontal rule - } else if ( match( block, /(^|\n) ? ? ?((\* *){3,}|(- *){3,}|(_ *){3,})($|\n)/) ) { - len = RLENGTH; st = RSTART; - return _block(substr(block, 1, st - 1)) "
\n" _block(substr(block, st + len)); # Blockquote (leading >) } else if ( match( block, /^> /) ) { @@@ -369,6 -364,11 +364,11 @@@ return "" inline( htxt ) "\n\n" \ _block( substr( block, len + 1) ); + # Horizontal rule + } else if ( match( block, /(^|\n) ? ? ?((\* *){3,}|(- *){3,}|(_ *){3,})($|\n)/) ) { + len = RLENGTH; st = RSTART; + return _block(substr(block, 1, st - 1)) "
\n" _block(substr(block, st + len)); + # Plain paragraph } else { match( block, /(^|\n)[[:space:]]*(\n|$)/ ) || match( block, /$/ );