Summary Files Commits Branches @commit @diff @stats
path: root / single.awk
diff options
context:
space:
mode:
1 files changed, 18 insertions, 18 deletions
-rw-r--r--single.awk36
diff --git a/single.awk b/single.awk
index 94801be..16299df 100644
--- a/single.awk
+++ b/single.awk
@@ -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