diff --git a/app/Services/Pdf/PdfBuilder.php b/app/Services/Pdf/PdfBuilder.php index 3c54cb2e8b..b57cd01b2c 100644 --- a/app/Services/Pdf/PdfBuilder.php +++ b/app/Services/Pdf/PdfBuilder.php @@ -2048,7 +2048,7 @@ class PdfBuilder */ private function isMarkdown(string $content): bool { - $content = str_ireplace('
', "\n", $content); + $content = str_ireplace(['
', '
', '
'], "\n", $content); $markdownPatterns = [ '/^\s*#{1,6}\s/m', // Headers @@ -2088,7 +2088,7 @@ class PdfBuilder $child['content'] = $child['content'] ?? ''; if ($this->service->company->markdown_enabled && $this->isMarkdown($child['content'])) { - $child['content'] = str_ireplace('
', "\r", $child['content']); + $child['content'] = str_ireplace(['
', '
', '
'], "\r", $child['content']); $child['content'] = $this->commonmark->convert($child['content']); //@phpstan-ignore-line }