From bc9f4dd47316e4314075cceba66dc96d983786db Mon Sep 17 00:00:00 2001 From: DatanoiseTV <6614616+DatanoiseTV@users.noreply.github.com> Date: Thu, 11 Jun 2026 15:46:18 +0200 Subject: [PATCH] ci: escape regex metacharacters in baseline links for .lycheeignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Baseline links are appended verbatim to .lycheeignore, whose lines lychee parses as regexes. A baseline URL containing regex metacharacters aborts the whole check with a parse error before any link is verified — currently triggered by the provisioning QR-code URL (`qrcode.html?data={%22ver%22...}`) in content/blog/2026/05/ simple-provisioning, which fails the blog_0-9a-f bucket for every PR. Escape the metacharacters so baseline URLs match literally. --- .github/workflows/pr-check-links-worker.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-check-links-worker.yml b/.github/workflows/pr-check-links-worker.yml index e91e92e73..7fe22dcb5 100644 --- a/.github/workflows/pr-check-links-worker.yml +++ b/.github/workflows/pr-check-links-worker.yml @@ -67,7 +67,10 @@ jobs: run: git switch -- "$HEAD_REF" - name: Append links-baseline.txt to .lycheeignore - run: cat links-baseline.txt >> .lycheeignore + # .lycheeignore lines are parsed as regexes; escape metacharacters so + # baseline URLs are treated literally (e.g. `?data={...}` in a URL is + # an invalid regex quantifier and aborts lychee with a parse error). + run: sed 's/[][\.^$*+?(){}|]/\\&/g' links-baseline.txt >> .lycheeignore - name: Dump names of files altered in PR and append hash sign to find links with anchors run: |