Summary Files Commits Branches @commit @diff @stats
path: root / single.awk
diff options
context:
space:
mode:
1 files changed, 6 insertions, 6 deletions
-rw-r--r--single.awk12
diff --git a/single.awk b/single.awk
index 5608522..e7d55e4 100644
--- a/single.awk
+++ b/single.awk
@@ -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
}