From 0de7592b89bbb3549cd3c0f27fbee0b9d5b6002c Mon Sep 17 00:00:00 2001 From: Jeyaprakash-NK Date: Tue, 13 Aug 2024 12:36:07 +0530 Subject: [PATCH] Fix - Properties value truncated with multi colon --- src/jobs/labelProperties.tsx | 4 ++-- src/runtime/createRunTime.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jobs/labelProperties.tsx b/src/jobs/labelProperties.tsx index 4ece4760..f35f5b66 100644 --- a/src/jobs/labelProperties.tsx +++ b/src/jobs/labelProperties.tsx @@ -151,7 +151,7 @@ function LabelProperties({ if (data.split(':')[1] === '') { data = data + value; } else { - data = data.replace(data.split(':')[1], value); + data = data.replace(data.split(/:(.+)/)[1], value); } } } @@ -287,7 +287,7 @@ function LabelProperties({ } defaultValue={ labelSplit.length > 2 - ? labelSplit[1] + ':' + labelSplit[2] + ? label.split(/:(.+)/)[1] : labelSplit[1] } Label={`Value ${index + 1}`} diff --git a/src/runtime/createRunTime.tsx b/src/runtime/createRunTime.tsx index befce2cb..876a737b 100644 --- a/src/runtime/createRunTime.tsx +++ b/src/runtime/createRunTime.tsx @@ -926,7 +926,7 @@ function CreateRunTime({ propertyObject[key] = value; }); propertyDetailUpdated.forEach((label: string) => { - const labelSplit = label.split(':'); + const labelSplit = label.split(/:(.+)/); const key = labelSplit[0]; const value = labelSplit[1]; propertyObject[key] = value;