@@ -62,36 +62,39 @@ jobs:
6262 print "\nBroken links found in:\n" file >> "lychee/comment.md"
6363 next
6464 }
65-
65+
6666 /\[ERROR\]/ {
6767 msg = $0
6868 sub(/^- \[ \] /, "", msg)
6969 sub(/^\[ERROR\] /, "", msg)
7070 gsub("^file:///home/runner/work/UmbracoDocs/UmbracoDocs/", "", msg)
71+ gsub(/\|/, "\\|", msg) # escape Markdown pipe
7172 print "\n⚓ Anchor not found → " msg "\n" >> "lychee/comment.md"
7273 next
7374 }
74-
75+
7576 /\[404\]/ {
7677 msg = $0
7778 sub(/^- \[ \] /, "", msg)
7879 sub(/^\[404\] /, "", msg)
79-
80+ gsub(/\|/, "\\|", msg) # escape pipe
8081 print "\n❌ 404 Not Found → " msg "\n" >> "lychee/comment.md"
8182 next
8283 }
83-
84+
8485 /\[301\]|\[302\]/ {
8586 msg = $0
8687 sub(/^- \[ \] /, "", msg)
8788 sub(/^\[(301|302)\] /, "", msg)
89+ gsub(/\|/, "\\|", msg) # escape pipe
8890 print "\n🔀 Redirect → " msg "\n" >> "lychee/comment.md"
8991 next
9092 }
91-
93+
9294 /Timeout/ && !/Timeouts/ {
9395 msg = $0
9496 sub(/^- \[ \] /, "", msg)
97+ gsub(/\|/, "\\|", msg) # escape pipe just in case
9598 print "\n⏳ Timeout → " msg "\n" >> "lychee/comment.md"
9699 next
97100 }
0 commit comments