\s includes newlines; match only space characters instead
This commit is contained in:
parent
466991d2a1
commit
107fa221c9
1 changed files with 3 additions and 3 deletions
|
|
@ -8,21 +8,21 @@ import {diff} from './util.mjs';
|
||||||
* Matches an empty `id-edb` infobox parameter which can just have a value
|
* Matches an empty `id-edb` infobox parameter which can just have a value
|
||||||
* inserted after it.
|
* 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`
|
* 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
|
* parameter. Whitespace in capture groups so the inserted parameter can use the
|
||||||
* exact same formatting.
|
* 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`
|
* 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
|
* parameter. Whitespace in capture groups so the inserted parameter can use the
|
||||||
* exact same formatting.
|
* 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.
|
* Inserts the `id-edb` item infobox parameter into the given page contents.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue