Bugfix: Diff
This commit is contained in:
parent
6cb4b9a691
commit
5d9128403a
@ -110,7 +110,6 @@ export class MotionSlideComponent extends BaseMotionSlideComponent<MotionSlideDa
|
|||||||
}
|
}
|
||||||
|
|
||||||
const origText = baseParagraphs[paraNo],
|
const origText = baseParagraphs[paraNo],
|
||||||
paragraphLines = this.lineNumbering.getLineNumberRange(origText),
|
|
||||||
diff = this.diff.diff(origText, newText),
|
diff = this.diff.diff(origText, newText),
|
||||||
affectedLines = this.diff.detectAffectedLineRange(diff);
|
affectedLines = this.diff.detectAffectedLineRange(diff);
|
||||||
|
|
||||||
@ -118,18 +117,12 @@ export class MotionSlideComponent extends BaseMotionSlideComponent<MotionSlideDa
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
let newTextLines = this.lineNumbering.insertLineNumbers(
|
const affectedDiff = this.diff.formatDiff(
|
||||||
newText,
|
this.diff.extractRangeByLineNumbers(diff, affectedLines.from, affectedLines.to)
|
||||||
this.lineLength,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
paragraphLines.from
|
|
||||||
);
|
|
||||||
newTextLines = this.diff.formatDiff(
|
|
||||||
this.diff.extractRangeByLineNumbers(newTextLines, affectedLines.from, affectedLines.to)
|
|
||||||
);
|
);
|
||||||
|
const affectedConsolidated = this.diff.diffHtmlToFinalText(affectedDiff);
|
||||||
|
|
||||||
return new MotionSlideObjAmendmentParagraph(amendment, paraNo, newTextLines, affectedLines);
|
return new MotionSlideObjAmendmentParagraph(amendment, paraNo, affectedConsolidated, affectedLines);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.filter((para: MotionSlideObjAmendmentParagraph) => para !== null);
|
.filter((para: MotionSlideObjAmendmentParagraph) => para !== null);
|
||||||
|
Loading…
Reference in New Issue
Block a user