diff options
| Commit | 3ffac7c2545544f1ebcf668ca559df974ea89e8d (patch) | |
|---|---|---|
| Author | 2025-01-01 10:42:03 +0200 | |
| Committer | 2025-01-01 10:42:03 +0200 | |
| Files | 9c3d1522274115d5ebc95206f1213f961806d369 | |
| csg-3ffac7c2545544f1ebcf668ca559df974ea89e8d.tar csg-3ffac7c2545544f1ebcf668ca559df974ea89e8d.tar.gz csg-3ffac7c2545544f1ebcf668ca559df974ea89e8d.zip | ||
| Parent | 56e895fe4c5d19ccc4d65e5671358ce8e04a0380 (diff) | |
chore(single): Move append to nonempty P in a function
This will be useful for lists
1 files changed, 6 insertions, 6 deletions
| -rw-r--r-- | single.awk | 12 |
@@ -50,6 +50,11 @@ function empty(value) { return value == "" } +function PNappnd(value) { + if (emptyP1) P2 = P2 ORS value + else P1 = P1 ORS value +} + function _next() { __buffered_print() not_paragraph = 1 @@ -172,12 +177,7 @@ blockquote_level > 0 && empty0 { _next() } inside_codeblock && ! /^[ \t]*$/ { - if (emptyP1) { - P2 = P2 ORS "</code></pre>" - } - else { - P1 = P1 ORS "</code></pre>" - } + PNappnd("</code></pre>") inside_codeblock = 0 emptyP1 = 1 } |
