Fix links getting linified when they shouldn't

This commit is contained in:
2026-03-07 20:15:00 +01:00
parent da606918a2
commit 6e445d5223
3 changed files with 7 additions and 6 deletions

View File

@@ -11,6 +11,7 @@ BEGIN { in_fence = 0; first_line = 0 }
next
}
if (in_fence) {
gsub(/&/, "\\&amp;"); gsub(/</, "\\&lt;"); gsub(/>/, "\\&gt;")
if (first_line) {
first_line = 0
if ($0 == "") next

View File

@@ -2,7 +2,7 @@ BEGIN { in_code = 0 }
/^ | / {
if (!in_code) { print "<pre><code>"; in_code = 1 }
sub(/^ | /, "", $0)
gsub(/&/, "&amp;"); gsub(/</, "&lt;"); gsub(/>/, "&gt;")
gsub(/&/, "\\&amp;"); gsub(/</, "\\&lt;"); gsub(/>/, "\\&gt;")
print; next
}
{ if (in_code) { print "</code></pre>"; in_code = 0 } print }