Fix regression of #3573. Refactor the code.
This commit is contained in:
parent
3ddc73b0a0
commit
bdd65d90b8
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user