Merge pull request #4854 from CatoTH/OS3-bugfix-missing-text-in-pdf-diff-view
Bugfix: missing text in PDF-exported diff view
This commit is contained in:
commit
a365cb9edb
@ -537,11 +537,10 @@ export class MotionRepositoryService extends BaseIsAgendaItemAndListOfSpeakersCo
|
|||||||
return this.diff.getTextWithChanges(targetMotion.text, changes, lineLength, highlightLine);
|
return this.diff.getTextWithChanges(targetMotion.text, changes, lineLength, highlightLine);
|
||||||
case ChangeRecoMode.Diff:
|
case ChangeRecoMode.Diff:
|
||||||
let text = '';
|
let text = '';
|
||||||
changes
|
const changesToShow = changes.filter(change => {
|
||||||
.filter(change => {
|
|
||||||
return change.showInDiffView();
|
return change.showInDiffView();
|
||||||
})
|
});
|
||||||
.forEach((change: ViewUnifiedChange, idx: number) => {
|
changesToShow.forEach((change: ViewUnifiedChange, idx: number) => {
|
||||||
if (idx === 0) {
|
if (idx === 0) {
|
||||||
text += this.diff.extractMotionLineRange(
|
text += this.diff.extractMotionLineRange(
|
||||||
targetMotion.text,
|
targetMotion.text,
|
||||||
@ -569,7 +568,7 @@ export class MotionRepositoryService extends BaseIsAgendaItemAndListOfSpeakersCo
|
|||||||
});
|
});
|
||||||
text += this.diff.getTextRemainderAfterLastChange(
|
text += this.diff.getTextRemainderAfterLastChange(
|
||||||
targetMotion.text,
|
targetMotion.text,
|
||||||
changes,
|
changesToShow,
|
||||||
lineLength,
|
lineLength,
|
||||||
highlightLine
|
highlightLine
|
||||||
);
|
);
|
||||||
|
@ -612,7 +612,6 @@ export class MotionPdfService {
|
|||||||
motionText = this.motionRepo.formatStatuteAmendment(statutes, motion, lineLength);
|
motionText = this.motionRepo.formatStatuteAmendment(statutes, motion, lineLength);
|
||||||
} else {
|
} else {
|
||||||
// lead motion or normal amendments
|
// lead motion or normal amendments
|
||||||
// TODO: Consider tile change recommendation
|
|
||||||
|
|
||||||
const changes = this.getUnifiedChanges(motion, lineLength);
|
const changes = this.getUnifiedChanges(motion, lineLength);
|
||||||
const textChanges = changes.filter(change => !change.isTitleChange());
|
const textChanges = changes.filter(change => !change.isTitleChange());
|
||||||
|
Loading…
Reference in New Issue
Block a user