fpdf2
fpdf2 copied to clipboard
Nested HTML lists start with a newline
Describe the bug An HTML list nested in another HTML list erroneously starts with a newline.
Minimal code Please include some minimal Python code reproducing your issue:
from fpdf import FPDF
if __name__ == '__main__':
pdf = FPDF()
pdf.add_page()
pdf.write_html(f"""<ul>
<li>First-order list item</li>
<li><ul>
<li>Second-order list item</li>
<li>Second-order list item</li>
</ul>
</li>
</ul>""")
pdf.output("test_nested_lists.pdf")
Environment Please provide the following information:
- Operating System: Windows
- Python version: Python 3.12.2
fpdf2version used: current version of the master branch of the remote repository (latest tag is 2.7.8)