Merge pull request #3575 from emanuelschuetze/fix3573

Fix regression of #3573.
This commit is contained in:
Norman Jäckel 2018-02-13 22:15:50 +01:00 committed by GitHub
commit 6c418bb850
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -817,12 +817,6 @@ angular.module('OpenSlidesApp.core.pdf', [])
hasClass(element, 'os-line-break') &&
hasClass(brParent, 'os-split-before'))) {
break;
} else if (element.nextSibling.nodeName === 'BR') {
// Add a dummy line, if the next tag is a BR tag again.
currentParagraph = create('text');
currentParagraph.lineHeight = 1.25;
currentParagraph.text.push(create('text', ' '));
alreadyConverted.push(currentParagraph);
} else {
currentParagraph = create("text");
if (lineNumberMode === "outside" &&
@ -830,6 +824,11 @@ angular.module('OpenSlidesApp.core.pdf', [])
element.parentNode.parentNode.nodeName !== "LI") {
currentParagraph.margin = [20, 0, 0, 0];
}
// Add a dummy line, if the next tag is a BR tag again. The line could
// not be empty otherwise it will be removed and the empty line is not displayed
if (element.nextSibling && element.nextSibling.nodeName === 'BR') {
currentParagraph.text.push(create('text', ' '));
}
currentParagraph.lineHeight = 1.25;
alreadyConverted.push(currentParagraph);
}