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:
Emanuel Schütze 2019-07-14 20:59:50 +02:00 committed by GitHub
commit a365cb9edb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 32 deletions

View File

@ -537,11 +537,10 @@ export class MotionRepositoryService extends BaseIsAgendaItemAndListOfSpeakersCo
return this.diff.getTextWithChanges(targetMotion.text, changes, lineLength, highlightLine);
case ChangeRecoMode.Diff:
let text = '';
changes
.filter(change => {
const changesToShow = changes.filter(change => {
return change.showInDiffView();
})
.forEach((change: ViewUnifiedChange, idx: number) => {
});
changesToShow.forEach((change: ViewUnifiedChange, idx: number) => {
if (idx === 0) {
text += this.diff.extractMotionLineRange(
targetMotion.text,
@ -569,7 +568,7 @@ export class MotionRepositoryService extends BaseIsAgendaItemAndListOfSpeakersCo
});
text += this.diff.getTextRemainderAfterLastChange(
targetMotion.text,
changes,
changesToShow,
lineLength,
highlightLine
);

View File

@ -612,7 +612,6 @@ export class MotionPdfService {
motionText = this.motionRepo.formatStatuteAmendment(statutes, motion, lineLength);
} else {
// lead motion or normal amendments
// TODO: Consider tile change recommendation
const changes = this.getUnifiedChanges(motion, lineLength);
const textChanges = changes.filter(change => !change.isTitleChange());