This commit is contained in:
David Holdeman 2023-01-13 16:02:05 -06:00 committed by GitHub
parent 4036d8a903
commit 32f3c0ca5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ searchfile() {
# Replace the old link with the new one.
# Parentheses are placed around both the old link and new one in order to ensure we replace the link,
# and not some other place in the file that happens to use the same words.
REPLACE=$(escape '('$link')')
REPLACE=$(escape '('"$link"')')
REPLACEWITH=$(escapeReplace "$NEWLINK")
sed -i "s/$REPLACE/\($REPLACEWITH\)/" "$1"
fi
@ -97,7 +97,7 @@ searchfile() {
# Replace the old link with the new one.
# Parentheses are placed around both the old link and new one in order to ensure we replace the link,
# and not some other place in the file that happens to use the same words.
REPLACE=$(escape '('$link')')
REPLACE=$(escape '('"$link"')')
REPLACEWITH=$(escapeReplace "$(basename "$FILE" .md)")
sed -i "s/$REPLACE/\($REPLACEWITH\)/" "$1"
continue