From 107fa221c996d0bc91b101c99e4556358e83f234 Mon Sep 17 00:00:00 2001 From: ewin Date: Mon, 28 Jul 2025 19:07:56 -0400 Subject: [PATCH] \s includes newlines; match only space characters instead --- src/index.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.mjs b/src/index.mjs index 14f7638..9c2051f 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -8,21 +8,21 @@ import {diff} from './util.mjs'; * Matches an empty `id-edb` infobox parameter which can just have a value * inserted after it. */ -const existingEmptyEDBIDParameter = /^(\s*\|\s*id-edb\s*=)\s*$/m; +const existingEmptyEDBIDParameter = /^( *\| *id-edb *=) *$/m; /** * Matches an `id-gt` infobox parameter above which we can insert an `id-edb` * parameter. Whitespace in capture groups so the inserted parameter can use the * exact same formatting. */ -const existingGTIDParameter = /^(\s*)\|(\s*)id-gt(\s*)=(\s*).*$/m; +const existingGTIDParameter = /^( *)\|( *)id-gt( *)=( *).*$/m; /** * Matches a `release` infobox parameter below which we can insert an `id-edb` * parameter. Whitespace in capture groups so the inserted parameter can use the * exact same formatting. */ -const existingReleaseParameter = /^(\s*)\|(\s*)release(\s*)=(\s*).*$/m; +const existingReleaseParameter = /^( *)\|( *)release( *)=( *).*$/m; /** * Inserts the `id-edb` item infobox parameter into the given page contents.