1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-09-14 19:01:38 +00:00

Merge pull request #2282 from kriss39/fix/mediawiki-relative-link-check

script: catch relative BIP links in mediawiki files
This commit is contained in:
Murch
2026-09-11 12:21:15 -07:00
committed by GitHub

View File

@@ -9,7 +9,7 @@
ECODE=0 ECODE=0
MEDIAWIKI_ECODE=0 MEDIAWIKI_ECODE=0
while IFS= read -r fname; do while IFS= read -r fname; do
GRES=$(grep -nE '\]\((https?://|\.\./bip-|/bip-)' "$fname") GRES=$(grep -nE '\]\((https?://|((\.\.?/)+|/)?bip-)' "$fname")
if [ "$GRES" != "" ]; then if [ "$GRES" != "" ]; then
if [ $MEDIAWIKI_ECODE -eq 0 ]; then if [ $MEDIAWIKI_ECODE -eq 0 ]; then
>&2 echo "GitHub Mediawiki format writes links as [URL text], not as [text](URL):" >&2 echo "GitHub Mediawiki format writes links as [URL text], not as [text](URL):"