diff --git a/.github/workflows/check-broken-pr-links.yml b/.github/workflows/check-broken-pr-links.yml index 399c4f1f97c..524e26f15cf 100644 --- a/.github/workflows/check-broken-pr-links.yml +++ b/.github/workflows/check-broken-pr-links.yml @@ -62,36 +62,39 @@ jobs: print "\nBroken links found in:\n" file >> "lychee/comment.md" next } - + /\[ERROR\]/ { msg = $0 sub(/^- \[ \] /, "", msg) sub(/^\[ERROR\] /, "", msg) gsub("^file:///home/runner/work/UmbracoDocs/UmbracoDocs/", "", msg) + gsub(/\|/, "\\|", msg) # escape Markdown pipe print "\nāš“ Anchor not found → " msg "\n" >> "lychee/comment.md" next } - + /\[404\]/ { msg = $0 sub(/^- \[ \] /, "", msg) sub(/^\[404\] /, "", msg) - + gsub(/\|/, "\\|", msg) # escape pipe print "\nāŒ 404 Not Found → " msg "\n" >> "lychee/comment.md" next } - + /\[301\]|\[302\]/ { msg = $0 sub(/^- \[ \] /, "", msg) sub(/^\[(301|302)\] /, "", msg) + gsub(/\|/, "\\|", msg) # escape pipe print "\nšŸ”€ Redirect → " msg "\n" >> "lychee/comment.md" next } - + /Timeout/ && !/Timeouts/ { msg = $0 sub(/^- \[ \] /, "", msg) + gsub(/\|/, "\\|", msg) # escape pipe just in case print "\nā³ Timeout → " msg "\n" >> "lychee/comment.md" next }