From af5910ba435ad408560a7a59569834efb0b951b1 Mon Sep 17 00:00:00 2001 From: Elblinator Date: Fri, 25 Oct 2024 14:59:19 +0200 Subject: [PATCH] Remove all odubled numbers --- .../motion-format.service/motion-format.service.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/services/common/motion-format.service/motion-format.service.ts b/client/src/app/site/pages/meetings/pages/motions/services/common/motion-format.service/motion-format.service.ts index 034053255a..1ab02babc7 100644 --- a/client/src/app/site/pages/meetings/pages/motions/services/common/motion-format.service/motion-format.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/services/common/motion-format.service/motion-format.service.ts @@ -297,12 +297,10 @@ export class MotionFormatService { if (text[i]?.indexOf(`amendment-nr-n-icon`) !== -1) { text[i + 1] = text[i + 1]?.replace(`os-split-after`, `os-split-after margin-top-0`); } - } - // Removes the doubled number from the first line - if ( - text[0].match(``) - ) { - text[0] = text[0].replace(` class=\"os-line-number line-number-1\"`, ``); + + if (text[i]?.search(` -1) { + text[i] = text[i].replace(/ class="os-line-number line-number-[1-9]+"/, ``); + } } return text; }