This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git
The following commit(s) were added to refs/heads/master by this push:
new fc244799 fix port range regex logic (recent fix to prevent non-initial
port ranges)
fc244799 is described below
commit fc24479970e32950100b7e4cdc000eda0e0ca74e
Author: Alex Heneveld <[email protected]>
AuthorDate: Tue Aug 23 11:37:27 2022 +0100
fix port range regex logic (recent fix to prevent non-initial port ranges)
---
ui-modules/blueprint-composer/app/components/util/model/dsl.model.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/ui-modules/blueprint-composer/app/components/util/model/dsl.model.js
b/ui-modules/blueprint-composer/app/components/util/model/dsl.model.js
index a05365d5..3adef23f 100644
--- a/ui-modules/blueprint-composer/app/components/util/model/dsl.model.js
+++ b/ui-modules/blueprint-composer/app/components/util/model/dsl.model.js
@@ -68,7 +68,7 @@ const ISSUES = new WeakMap();
const numberRegex = /^[+-]?\d+(?:\.\d*)?|^[+-]?\.\d+/;
-const portRangeRegex = /[\d]+\+|[\d]+-[\d]+/;
+const portRangeRegex = /^[\d]+\+|[\d]+-[\d]+/;
/**
* A component of a Dsl expression.
@@ -1026,7 +1026,7 @@ export class Tokenizer {
* @return {boolean}
*/
peekPortRange() {
- return this.s.search("^"+portRangeRegex) >= 0;
+ return this.s.search(portRangeRegex) >= 0;
}
/**