From b0e45eaf32a2d4fcd0efd8f6b07413c1b2369d7b Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Mon, 16 Feb 2026 19:06:17 +0100 Subject: [PATCH] fix(links): add regex anchors to remap patterns Add ^ and $ anchors to the lychee --remap patterns to prevent partial URL matching (e.g., a URL embedded inside another URL being incorrectly remapped). Signed-off-by: Gregor Zeitlinger --- tasks/lint/links.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/lint/links.sh b/tasks/lint/links.sh index 6d2d96a..df46c57 100755 --- a/tasks/lint/links.sh +++ b/tasks/lint/links.sh @@ -54,9 +54,9 @@ build_remap_args() { local head_url="https://github.com/${head_repo}" echo "--remap" - echo "${base_url}/blob/${base_ref}/(.*) ${head_url}/blob/${head_ref}/\$1" + echo "^${base_url}/blob/${base_ref}/(.*)$ ${head_url}/blob/${head_ref}/\$1" echo "--remap" - echo "${base_url}/tree/${base_ref}/(.*) ${head_url}/tree/${head_ref}/\$1" + echo "^${base_url}/tree/${base_ref}/(.*)$ ${head_url}/tree/${head_ref}/\$1" } run_lychee() {