-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
Description
Describe the bug and add attachments
When you have a list with a nested list with text before and after the nested list, the created result is that the before and after text is merged together before the nested list
Expected behavior
I expect the before and after to be on the correct places
Steps to reproduce
<?php __DIR__.'/vendor/autoload.php'
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
$html = '<ul><li>Item 1</li><li><p>play</p><ul><li>tic</li><li>tac</li><li>toe</li></ul><p>with friends</p></li><li>item 3</li></ul>';
\PhpOffice\PhpWord\Shared\Html::addHtml($section, $html, preserveWhiteSpace: false);
$writer = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord);
$writer->save('./example ('.date('Y-m-d H-i-s').').docx');PHPWord version(s) where the bug happened
1.4.0
PHP version(s) where the bug happened
8.4
Priority
- I want to crowdfund the bug fix (with @algora-io) and fund a community developer.
- I want to pay the bug fix and fund a maintainer for that. (Contact @Progi1984)