Skip to content

write_html: support <ul type="square"> instead of raising NotImplemen… - #1989

Merged
andersonhc merged 1 commit into
py-pdf:masterfrom
RavSinghChandan:html-ul-type-square
Oct 10, 2026
Merged

andersonhc merged 1 commit into
py-pdf:masterfrom
RavSinghChandan:html-ul-type-square

Conversation

@RavSinghChandan

Copy link
Copy Markdown

<ul type="square"> made write_html() raise NotImplementedError: Unsupported type: square, although "square" is one of the three standard HTML bullet types next to "disc" and "circle", which are already supported.

It now renders the way "circle" does: Unicode fonts use ▪ (U+25AA BLACK SMALL SQUARE), and core fonts, whose Windows-1252 encoding has no square, fall back to the bullet. The ul_bullet_char docstring now lists "square" too.

Checklist:

  • A unit test is covering the code added / modified by this PR
  • In case of a new feature, docstrings have been added, with also some documentation in the docs/ folder (docstring updated)
  • A mention of the change is present in CHANGELOG.md
  • This PR is ready to be merged

By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.

@andersonhc andersonhc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Good to merge.

@andersonhc
andersonhc merged commit 45a690f into py-pdf:master Oct 10, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants