Skip to content

Commit 945cbd9

Browse files
committed
HTML Reader : Heading in Text Run is not allowed
1 parent be0190c commit 945cbd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpWord/Shared/Html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ protected static function parseCell($node, $element, &$styles)
440440
*/
441441
protected static function shouldAddTextRun(\DOMNode $node)
442442
{
443-
$containsBlockElement = self::$xpath->query('.//table|./p|./ul|./ol', $node)->length > 0;
443+
$containsBlockElement = self::$xpath->query('.//table|./p|./ul|./ol|./h1|./h2|./h3|./h4|./h5|./h6', $node)->length > 0;
444444
if ($containsBlockElement) {
445445
return false;
446446
}

0 commit comments

Comments
 (0)