From e4ec88d7e217d9fbc26d307cd621487db0f3dea3 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Mon, 4 May 2020 22:52:53 +0100 Subject: [PATCH] link-check: ignore URLs preceded by (#1234) --- scripts/utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils.sh b/scripts/utils.sh index e3e4f53818..85bd8efeb4 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -13,7 +13,7 @@ urlfinder(){ # expects ... base_url="$1" content="$(cat "${@:2}")" # read once (could be file descriptors) # explicit links not in markdown - echo "$content" | pcregrep -o '(?{}"'"'"'`]+' + echo "$content" | pcregrep -o '(?{}"'"'"'`]+' # explicit links in markdown echo "$content" | pcregrep -o '(?<=\])\(https?://[^[\]\s]+\)' | pcregrep -o '\((?:[^)(]*(?R)?)*+\)' | pcregrep -o '(?<=\().*(?=\))' # relative links in markdown