From 4e8f732c4decb3715342c58cf2b8951b2d3425a3 Mon Sep 17 00:00:00 2001 From: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Date: Sun, 5 May 2024 22:09:10 +0200 Subject: [PATCH] scripts/wrong-filename.sh: remove too aggressive replacement --- scripts/wrong-filename.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wrong-filename.sh b/scripts/wrong-filename.sh index 1aaef2e69..45f4d99b1 100755 --- a/scripts/wrong-filename.sh +++ b/scripts/wrong-filename.sh @@ -19,7 +19,7 @@ find pages* -name '*.md' -type f | while read -r path; do COMMAND_NAME_FILE=$(basename "$path" | head -c-4 | sed 's/nix3/nix/' | sed 's/\.fish//' | sed 's/\.js//' | sed 's/\.1//' | tr '-' ' ' | tr '[:upper:]' '[:lower:]') # Extract the command name from the first line of the Markdown file - COMMAND_NAME_PAGE=$(head -n1 "$path" | tail -c+3 | sed 's/--//' | tr '.' ' ' | tr '-' ' ' | tr '[:upper:]' '[:lower:]') + COMMAND_NAME_PAGE=$(head -n1 "$path" | tail -c+3 | sed 's/--//' | tr '-' ' ' | tr '[:upper:]' '[:lower:]') # Check if there is a mismatch between filename and content command names if [[ "$COMMAND_NAME_FILE" != "$COMMAND_NAME_PAGE" && ! ${IGNORE_LIST[*]} =~ $COMMAND_NAME_PAGE ]]; then