From: Paul Hänsch Date: Sun, 26 Jun 2022 17:31:00 +0000 (+0200) Subject: bugfix anchor links starting with # character X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=175ea9642bc5997c5e59b69f01a9f9d0e4f3039f;p=cgilite bugfix anchor links starting with # character --- diff --git a/markdown.awk b/markdown.awk index 2dec7c8..f06977c 100755 --- a/markdown.awk +++ b/markdown.awk @@ -490,7 +490,7 @@ function _block( block, LOCAL, st, len, hlvl, htxt, guard, code, indent, attrib HL[1]++; HL[2] = 0; HL[3] = 0; HL[4] = 0; HL[5] = 0; HL[6] = 0; return "

" \ inline( gensub( /\n.*$/, "", "g", block ) ) \ - "

\n\n" \ _block( substr( block, len + 1 ) ); @@ -500,7 +500,7 @@ function _block( block, LOCAL, st, len, hlvl, htxt, guard, code, indent, attrib HL[2]++; HL[3] = 0; HL[4] = 0; HL[5] = 0; HL[6] = 0; return "

" \ inline( gensub( /\n.*$/, "", "g", block ) ) \ - "

\n\n" \ _block( substr( block, len + 1) ); @@ -512,7 +512,7 @@ function _block( block, LOCAL, st, len, hlvl, htxt, guard, code, indent, attrib HL[hlvl]++; for ( n = hlvl + 1; n < 7; n++) { HL[n] = 0;} hid = HL[1]; for ( n = 2; n <= hlvl; n++) { hid = hid "." HL[n] ; } return "" inline( htxt ) \ - "\n\n" \ + "\n\n" \ _block( substr( block, len + 1) ); # Split paragraphs