diff options
| Commit | 52a93e7428aaa44069b36ea21fb1c8daed9109b3 (patch) | |
|---|---|---|
| Author | 2025-01-01 14:49:32 +0200 | |
| Committer | 2025-01-01 14:49:32 +0200 | |
| Files | e664e72e0f31bd2278faf184f05b358619dae1b0 /single.awk | |
| csg-52a93e7428aaa44069b36ea21fb1c8daed9109b3.tar csg-52a93e7428aaa44069b36ea21fb1c8daed9109b3.tar.gz csg-52a93e7428aaa44069b36ea21fb1c8daed9109b3.zip | ||
| Parent | 681b6ce5fb1c5d903f70bb81fb6f210689f0859e (diff) | |
fix(single): Fix link definitions not being removed when placed after a codeblock
1 files changed, 18 insertions, 18 deletions
| -rw-r--r-- | single.awk | 36 |
@@ -102,6 +102,24 @@ BEGIN { last_html = 0 } +# Fenced code blocks +fenced_codeblock { + $0 = " " $0 +} + +# Code blocks (ending) +inside_codeblock && (/ ```/ || ! /^( |\t|[ \t]*$)/) { + PNappnd("</code></pre>") + inside_codeblock = 0 + emptyP1 = 1 + not_paragraph = 1 + if (fenced_codeblock) { + fenced_codeblock = 0 + fenced_class = "" + next + } +} + # Link definition !inside_codeblock && /^\[[^\]]+\]:[ \t]+.*/ { next @@ -155,24 +173,6 @@ blockquote_level > 0 && empty0 { } /^>$/ { $0 = ""; not_paragraph = 1 } -# Fenced code blocks -fenced_codeblock { - $0 = " " $0 -} - -# Code blocks (ending) -inside_codeblock && (/ ```/ || ! /^( |\t|[ \t]*$)/) { - PNappnd("</code></pre>") - inside_codeblock = 0 - emptyP1 = 1 - not_paragraph = 1 - if (fenced_codeblock) { - fenced_codeblock = 0 - fenced_class = "" - next - } -} - # Lists function end_list() { if (list_level == 0) return |
