diff --git a/src/features/dfdElements/outputPortBehaviorValidation.ts b/src/features/dfdElements/outputPortBehaviorValidation.ts index b2736e5..023b74d 100644 --- a/src/features/dfdElements/outputPortBehaviorValidation.ts +++ b/src/features/dfdElements/outputPortBehaviorValidation.ts @@ -23,13 +23,13 @@ export class PortBehaviorValidator { // Regex that validates a set statement. // Has the label type and label value that should be set as capturing groups. private static readonly SET_REGEX = - /^set +([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*) *= *(?: +|!|TRUE|FALSE|\|\||&&|\(|\)|[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*){2})+$/; + /^set +([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*) *= *(?: +|!|TRUE|FALSE|\|\||&&|\(|\)|[A-Za-z][A-Za-z0-9_\|]*(?:\.[A-Za-z][A-Za-z0-9_]*){2})+$/; // Regex that is used to extract all inputs, their label types and label values from a set statement. // Each input is a match with the input name, label type and label value as capturing groups. private static readonly SET_REGEX_EXPRESSION_INPUTS = - /([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*)/g; + /([A-Za-z][A-Za-z0-9_\|]*)\.([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*)/g; // Regex matching alphanumeric characters. - public static readonly REGEX_ALPHANUMERIC = /[A-Za-z0-9_]+/; + public static readonly REGEX_ALPHANUMERIC = /[A-Za-z0-9_\|]+/; constructor(@inject(LabelTypeRegistry) @optional() private readonly labelTypeRegistry?: LabelTypeRegistry) {} diff --git a/src/features/dfdElements/outputPortEditUi.ts b/src/features/dfdElements/outputPortEditUi.ts index ee4c493..6d7a28e 100644 --- a/src/features/dfdElements/outputPortEditUi.ts +++ b/src/features/dfdElements/outputPortEditUi.ts @@ -103,7 +103,7 @@ const dfdBehaviorLanguageMonarchDefinition: monaco.languages.IMonarchLanguage = root: [ // keywords and identifiers [ - /[a-zA-Z_$][\w$]*/, + /[a-zA-Z_\|$][\w$]*/, { cases: { "@keywords": "keyword", diff --git a/src/features/dfdElements/ports.tsx b/src/features/dfdElements/ports.tsx index a61e740..6d0f5e6 100644 --- a/src/features/dfdElements/ports.tsx +++ b/src/features/dfdElements/ports.tsx @@ -54,7 +54,7 @@ export class DfdInputPortImpl extends SPortImpl { if (edgeNames.length === 0) { return undefined; } else { - return edgeNames.sort().join("_"); + return edgeNames.sort().join("|"); } }