From 81fe84eb02940e4d6ad42fe91ec5e9fe1e21613d Mon Sep 17 00:00:00 2001 From: George Date: Mon, 6 Feb 2023 14:43:13 +0200 Subject: [PATCH] RED-4590: Group Regex so precedence is obvious. --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index 44024837e..0f239074a 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -391,7 +391,7 @@ export class AnnotationWrapper implements IListable, Record { if (entry.reason) { content += entry.reason + '\n\n'; //remove leading and trailing commas and whitespaces - content = content.replace(/^[, ]*|[, ]*$/g, ''); + content = content.replace(/(^[, ]*)|([, ]*$)/g, ''); content = content.substring(0, 1).toUpperCase() + content.substring(1); }