Minor fixes
This commit is contained in:
parent
19f726d54a
commit
b32c9f4749
|
|
@ -2048,7 +2048,7 @@ class PdfBuilder
|
|||
*/
|
||||
private function isMarkdown(string $content): bool
|
||||
{
|
||||
$content = str_ireplace('<br>', "\n", $content);
|
||||
$content = str_ireplace(['<br>', '<br/>', '<br />'], "\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('<br>', "\r", $child['content']);
|
||||
$child['content'] = str_ireplace(['<br>', '<br/>', '<br />'], "\r", $child['content']);
|
||||
$child['content'] = $this->commonmark->convert($child['content']); //@phpstan-ignore-line
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue