mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #2888 from kazuhitoyokoi/dev-fixtraviserr
Fix regular expression for Node.js v8
This commit is contained in:
commit
6c66ca8acf
@ -31,7 +31,7 @@ RED.palette.editor = (function() {
|
||||
var eventTimers = {};
|
||||
var activeFilter = "";
|
||||
|
||||
var semverre = /^(?<major>\d+)(\.(?<minor>\d+))?(\.(?<patch>\d+))?(-(?<pre>[0-9A-Za-z-]+))?(\.(?<build>[0-9A-Za-z-.]+))?$/;
|
||||
var semverre = /^(\d+)(\.(\d+))?(\.(\d+))?(-([0-9A-Za-z-]+))?(\.([0-9A-Za-z-.]+))?$/;
|
||||
var NUMBERS_ONLY = /^\d+$/;
|
||||
|
||||
function SemVerPart(part) {
|
||||
@ -61,8 +61,8 @@ RED.palette.editor = (function() {
|
||||
};
|
||||
|
||||
function SemVer(ver) {
|
||||
var groups = ver.match( semverre ).groups;
|
||||
this.parts = [ new SemVerPart( groups.major ), new SemVerPart( groups.minor ), new SemVerPart( groups.patch ), new SemVerPart( groups.pre ), new SemVerPart( groups.build ) ];
|
||||
var groups = ver.match( semverre );
|
||||
this.parts = [ new SemVerPart( groups[1] ), new SemVerPart( groups[3] ), new SemVerPart( groups[5] ), new SemVerPart( groups[7] ), new SemVerPart( groups[9] ) ];
|
||||
}
|
||||
|
||||
SemVer.prototype.compare = function(other) {
|
||||
|
Loading…
Reference in New Issue
Block a user