Allow + to be in lists for markdown

This commit is contained in:
David Bomba 2025-01-27 07:49:44 +11:00
parent 27ef354489
commit f8dbb2753b
2 changed files with 2 additions and 17 deletions

View File

@ -2012,15 +2012,7 @@ class PdfBuilder
$first_char = substr($trimmed, 0, 1);
if (
$first_char === '#' || // Headers
$first_char === '>' || // Blockquotes
$first_char === '-' || // Lists
$first_char === '+' || // Lists
$first_char === '*' || // Lists/Bold
$first_char === '_' || // Italic
$first_char === '`' || // Code
$first_char === '[' || // Links
if (in_array($first_char, ['#', '>', '-', '+', '*', '_', '`', '[']) || // Markdown characters
str_contains($trimmed, '**') // Bold (special case)
) {
$contains_markdown = true;

View File

@ -106,14 +106,7 @@ trait PdfMakerUtilities
$first_char = substr($trimmed, 0, 1);
if (
$first_char === '#' || // Headers
$first_char === '>' || // Blockquotes
$first_char === '-' || // Lists
$first_char === '+' || // Lists
$first_char === '*' || // Lists/Bold
$first_char === '_' || // Italic
$first_char === '`' || // Code
$first_char === '[' || // Links
in_array($first_char, ['#', '>', '-', '+', '*', '_', '`', '[']) || // Markdown characters
str_contains($trimmed, '**') // Bold (special case)
) {
$contains_markdown = true;