diff --git a/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.ts b/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.ts
index f22cf36343..4b3601eaa3 100644
--- a/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.ts
+++ b/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.ts
@@ -2005,7 +2005,6 @@ export class MotionDiffService {
firstLine: change.getLineFrom()
});
let diff = this.diff(oldText, change.getChangeNewText());
- //console.log(diff);
// If an insertion makes the line longer than the line length limit, we need two line breaking runs:
// - First, for the official line numbers, ignoring insertions (that's been done some lines before)
@@ -2023,7 +2022,6 @@ export class MotionDiffService {
DomHelpers.addCSSClassToFirstTag(origBeginning, `merge-before`) + diff.substring(origBeginning.length);
}
- //console.log(diff);
return diff;
}
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 d93be38767..45fb026e8d 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
@@ -239,21 +239,7 @@ export class MotionFormatService {
)
);
}
- text[text.length - 1] = text[text.length - 1].replace(`os-line-number `, ``);
- text.push(``);
- if (this.hasCollissions(changesToShow[i], changesToShow)) {
- text.push(`warning`);
- }
- const current_text = changesToShow[i];
- if (`amend_nr` in current_text) {
- if (typeof current_text.amend_nr === `string`) {
- text.push(``, current_text.amend_nr);
- }
- if (current_text.amend_nr === ``) {
- text.push(`Amendment`);
- }
- text.push(`:`);
- }
+ text.push(...this.addAmendmentNr(changesToShow, changesToShow[i]));
text.push(this.diffService.getChangeDiff(motionText, changesToShow[i], lineLength, highlightedLine));
lastLineTo = changesToShow[i].getLineTo();
}
@@ -261,11 +247,28 @@ export class MotionFormatService {
text.push(
this.diffService.getTextRemainderAfterLastChange(motionText, changesToShow, lineLength, highlightedLine)
);
- //console.log(text, text.join(``));
return text.join(``);
};
public hasCollissions(change: ViewUnifiedChange, changes: ViewUnifiedChange[]): boolean {
return this.diffService.changeHasCollissions(change, changes);
}
+
+ private addAmendmentNr(changesToShow: ViewUnifiedChange[], current_text: ViewUnifiedChange): string[] {
+ const amendmentNr: string[] = [];
+ amendmentNr.push(``);
+ if (this.hasCollissions(current_text, changesToShow)) {
+ amendmentNr.push(`warning`);
+ }
+ if (`amend_nr` in current_text) {
+ if (typeof current_text.amend_nr === `string`) {
+ amendmentNr.push(``, current_text.amend_nr);
+ }
+ if (current_text.amend_nr === ``) {
+ amendmentNr.push(`Amendment`);
+ }
+ amendmentNr.push(`:`);
+ }
+ return amendmentNr;
+ }
}