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); }