Skip to content

Commit

Permalink
link-check: ignore URLs preceded by (#1234)
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl authored May 4, 2020
1 parent c551499 commit e4ec88d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ urlfinder(){ # expects <base_url> <files>...
base_url="$1"
content="$(cat "${@:2}")" # read once (could be file descriptors)
# explicit links not in markdown
echo "$content" | pcregrep -o '(?<!\]\()https?://[^\s<>{}"'"'"'`]+'
echo "$content" | pcregrep -o '(?<!\]\(|#)https?://[^\s<>{}"'"'"'`]+'
# explicit links in markdown
echo "$content" | pcregrep -o '(?<=\])\(https?://[^[\]\s]+\)' | pcregrep -o '\((?:[^)(]*(?R)?)*+\)' | pcregrep -o '(?<=\().*(?=\))'
# relative links in markdown
Expand Down

0 comments on commit e4ec88d

Please sign in to comment.