Summary Files Commits Branches @commit @diff @stats
path: root / single.awk
diff options
context:
space:
mode:
Commit56e895fe4c5d19ccc4d65e5671358ce8e04a0380 (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-01-01 10:41:21 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-01-01 10:41:21 +0200
Files53c508099cb4379e3d7b6e9a536ab6913c3591ef /single.awk
csg-56e895fe4c5d19ccc4d65e5671358ce8e04a0380.tar
csg-56e895fe4c5d19ccc4d65e5671358ce8e04a0380.tar.gz
csg-56e895fe4c5d19ccc4d65e5671358ce8e04a0380.zip
Parentafee47c616ca5551f1b7eef7428c416134d31789 (diff)
chore(single): Move horizontal rule above blockquotes
This will be useful for lists
1 files changed, 6 insertions, 6 deletions
-rw-r--r--single.awk12
diff --git a/single.awk b/single.awk
index a27d61c..5608522 100644
--- a/single.awk
+++ b/single.awk
@@ -124,6 +124,12 @@ BEGIN {
}
}
+# Horizontal rule
+/^(---+|- - -( -)*|\*\*\*+|\* \* \*( \*)*|___+|_ _ _( _)*)$/ {
+ $0 = "<hr/>"
+ not_paragraph = 1
+}
+
# Blockquotes
blockquote_level > 0 && empty0 {
for (P1 = P1 ORS; blockquote_level > 0; --blockquote_level) {
@@ -239,12 +245,6 @@ inside_codeblock && ! /^[ \t]*$/ {
not_paragraph = 1
}
-# Horizontal rule
-/^(---+|- - -( -)*|\*\*\*+|\* \* \*( \*)*|___+|_ _ _( _)*)$/ {
- $0 = "<hr/>"
- not_paragraph = 1
-}
-
# Emphasis
function surround(brace, left, right, blen) {
if (blen == "") { blen = length(brace) }