From: Paul Hänsch Date: Mon, 9 Oct 2023 12:01:14 +0000 (+0200) Subject: Squashed 'cgilite/' changes from 41642aa..1e12e80 X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=8d70db1b103253dc37ba234b8c65b57a6cced077;p=shellwiki Squashed 'cgilite/' changes from 41642aa..1e12e80 1e12e80 force ALT-text for images git-subtree-dir: cgilite git-subtree-split: 1e12e80fbfed62596f992d0939418059174c4928 --- diff --git a/markdown.awk b/markdown.awk index 75f1827..249f507 100755 --- a/markdown.awk +++ b/markdown.awk @@ -231,9 +231,10 @@ function inline( line, LOCAL, len, text, code, href, guard ) { else if ( match(title, /^'.*'$/) ) { sub(/^'/, "", title); sub(/'$/, "", title); } else if ( match(title, /^\(.*\)$/) ) { sub(/^\(/, "", title); sub(/\)$/, "", title); } - gsub(/\\/, "", href); gsub(/\\/, "", title); gsub(/[\n\t]+/, " ", title); + gsub(/^[\t ]+$/, "", text); gsub(/\\/, "", href); + gsub(/\\/, "", title); gsub(/[\n\t]+/, " ", title); - return "\""" inline( substr( line, len + 1) ); @@ -660,10 +661,10 @@ function _block( block, LOCAL, st, len, text, title, attrib, href, guard, code, else if ( match(title, /^'.*'$/) ) { sub(/^'/, "", title); sub(/'$/, "", title); } else if ( match(title, /^\(.*\)$/) ) { sub(/^\(/, "", title); sub(/\)$/, "", title); } - gsub(/\\/, "", href); + gsub(/^[\t ]+$/, "", text); gsub(/\\/, "", href); return "
" \ - "\""" \ (title?"
" inline(title) "
":"") \ "
\n\n" \