Skip to content

Commit 5c08341

Browse files
committed
Merge branch 'main' of https://github.com/umbraco/UmbracoDocs into vale-errors-v1
2 parents e68317a + 863247e commit 5c08341

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/check-broken-pr-links.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)