X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=cgilite%2Fmarkdown.awk;h=249f5074b213b68511f94009b5d708db99b0b51a;hb=532b6743da019906f2f00575d246823c66ec35fd;hp=75f182746bd29d9375c7af1b1e52c39737fb2a58;hpb=b2c6706c40fe49940e59f9b71e52c2d2d18c3d57;p=shellwiki
diff --git a/cgilite/markdown.awk b/cgilite/markdown.awk
index 75f1827..249f507 100755
--- a/cgilite/markdown.awk
+++ b/cgilite/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 "\n\n" \