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.