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

script: catch relative BIP links in mediawiki files

This commit is contained in:
Kanan
2026-09-11 17:16:07 +04:00
parent 620871a7a4
commit 43bd57b707

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):"