Fix unwanted line break in pdf export (#6408)

for inactive linenumbering
This commit is contained in:
Magnus Schieder 2022-04-24 17:48:40 +02:00 committed by GitHub
parent ff1d5c0c4d
commit 58d5bf7d6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -342,11 +342,15 @@ export class HtmlToPdfService {
break;
}
case 'br': {
newParagraph = this.create('text');
// yep thats all
newParagraph.text = '\n';
newParagraph.lineHeight = this.LINE_HEIGHT;
break;
if (this.lineNumberingMode === LineNumberingMode.None && classes.includes('os-line-break')) {
break;
} else {
newParagraph = this.create('text');
// yep thats all
newParagraph.text = '\n';
newParagraph.lineHeight = this.LINE_HEIGHT;
break;
}
}
case 'ul':
case 'ol': {