PHPWord icon indicating copy to clipboard operation
PHPWord copied to clipboard

fix bullet list render compatibility with latest ms word version

Open jgiacomello opened this issue 9 months ago • 1 comments

Description

I noticed that creating a file from html unordered lists rendered symbols differently than the MS Word default.

Example code:

<ul>
    <li>lista 1</li>
    <li>lista 1<ul>
            <li>lista 2</li>
            <li>lista 2<ul>
                    <li>lista 3</li>
                </ul>
            </li>
            <li>lista 2</li>
        </ul>
    </li>
    <li>lista 1</li>
    <li>lista 1</li>
</ul>

result with current library version: image

result with fixes: image

I'm using this MS Word version: Microsoft® Word for Microsoft 365 MSO (Version 2502)

Checklist:

  • [ ] My CI is :green_circle:
  • [ ] I have covered by unit tests my new code (check build/coverage for coverage report)
  • [ ] I have updated the documentation to describe the changes
  • [ ] I have updated the changelog

jgiacomello avatar Mar 28 '25 15:03 jgiacomello

Coverage Status

coverage: 96.757%. remained the same when pulling a38f89830d79eedd4a42ebcf9847a17ecd9264ac on jgiacomello:bullet_list_render into 0ab0b4940bc52c7183e82ab2fd55324607037a73 on PHPOffice:master.

coveralls avatar Mar 31 '25 08:03 coveralls