Summary Files Commits Branches @commit @diff @stats
path: root / single.awk
diff options
context:
space:
mode:
1 files changed, 5 insertions, 3 deletions
-rw-r--r--single.awk8
diff --git a/single.awk b/single.awk
index 60e32ae..0752b9f 100644
--- a/single.awk
+++ b/single.awk
@@ -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(/</, "\\&lt;")
gsub(/>/, "\\&gt;")
+ if (!inside_codeblock) {
+ $0 = "<pre><code>" $0
+ inside_codeblock = 1
+ }
+
_next()
}