mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2025-12-27 04:58:17 +00:00
Fix for regex filter using unescaped '.'
This commit is contained in:
parent
2fa33887a3
commit
0b58042494
1 changed files with 2 additions and 2 deletions
|
|
@ -63,10 +63,10 @@ export class DefaultTagFormatter implements TagFormatter {
|
|||
|
||||
public IsValid(tag: string): boolean {
|
||||
if (!!this.namespace) {
|
||||
return new RegExp(`^${this.tagPrefix}[0-9]+.[0-9]+.[0-9]+${this.namespaceSeperator}${this.namespace}$`).test(tag);
|
||||
return new RegExp(`^${this.tagPrefix}[0-9]+\.[0-9]+\.[0-9]+${this.namespaceSeperator}${this.namespace}$`).test(tag);
|
||||
}
|
||||
|
||||
return new RegExp(`^${this.tagPrefix}[0-9]+.[0-9]+.[0-9]+$`).test(tag);
|
||||
return new RegExp(`^${this.tagPrefix}[0-9]+\.[0-9]+\.[0-9]+$`).test(tag);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue