-
Notifications
You must be signed in to change notification settings - Fork 664
Closed
Labels
fix developedrelease schedule to be determinedrelease schedule to be determinedupstream bugbug outside this packagebug outside this package
Description
Description of the bug
When you use an unordered list (<ul>) inside an ordered list (<ol>) item, you get a broken count where it will count the items in the <ul> as part of the <ol>.
How to reproduce the bug
Here's a small reproducer:
import fitz
HTML = """
<p>Count is fine:</p>
<ol>
<li>Lorem
<ol>
<li>Sub Lorem</li>
<li>Sub Lorem</li>
</ol>
</li>
<li>Lorem</li>
<li>Lorem</li>
</ol>
<p>Broken count:</p>
<ol>
<li>Lorem
<ul>
<li>Sub Lorem</li>
<li>Sub Lorem</li>
</ul>
</li>
<li>Lorem</li>
<li>Lorem</li>
</ol>
"""
MEDIABOX = fitz.paper_rect("A4")
WHERE = MEDIABOX + (36, 36, -36, -36)
story = fitz.Story(html=HTML)
writer = fitz.DocumentWriter("output.pdf")
more = 1
while more:
device = writer.begin_page(MEDIABOX)
more, _ = story.place(WHERE)
story.draw(device)
writer.end_page()
writer.close()PyMuPDF version
1.24.9
Operating system
Linux
Python version
3.12
Metadata
Metadata
Assignees
Labels
fix developedrelease schedule to be determinedrelease schedule to be determinedupstream bugbug outside this packagebug outside this package
