diff options
| Commit | cb888c3ddad432a4a66106834d7655592becee3b (patch) | |
|---|---|---|
| Author | 2025-01-01 14:42:40 +0200 | |
| Committer | 2025-01-01 14:42:40 +0200 | |
| Files | b66caaca43da13807d658a78f297d04850889a24 /single.awk | |
| csg-cb888c3ddad432a4a66106834d7655592becee3b.tar csg-cb888c3ddad432a4a66106834d7655592becee3b.tar.gz csg-cb888c3ddad432a4a66106834d7655592becee3b.zip | ||
| Parent | c898624b54087f482f84c16a44677ab63f842d47 (diff) | |
fix(single): Open code blocks on the first line, not previous
This doesn't introduce another newline into the codeblock
1 files changed, 5 insertions, 3 deletions
| -rw-r--r-- | single.awk | 8 |
@@ -241,9 +241,6 @@ list_started && /^\[[x ]\][ \t]/ { # Code blocks /^( |\t)/ { - if (!inside_codeblock) { - P1 = P1 "<pre><code>" - inside_codeblock = 1 } ## Autoescape & and < @@ -254,6 +251,11 @@ list_started && /^\[[x ]\][ \t]/ { gsub(/</, "\\<") gsub(/>/, "\\>") + if (!inside_codeblock) { + $0 = "<pre><code>" $0 + inside_codeblock = 1 + } + _next() } |
