Skip to content

write_html: render an <a> without href as plain text instead of raisi… - #1984

Merged
andersonhc merged 2 commits into
py-pdf:masterfrom
RavSinghChandan:html-anchor-without-href
Oct 10, 2026
Merged

andersonhc merged 2 commits into
py-pdf:masterfrom
RavSinghChandan:html-anchor-without-href

Conversation

@RavSinghChandan

Copy link
Copy Markdown

write_html() raised KeyError: 'href' on an tag without href, like Introduction. That tag is an anchor, not a link, so its text is now printed as plain text. Added a test and a CHANGELOG entry.

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

Copy link
Copy Markdown
Collaborator

@allcontributors please add @RavSinghChandan for code

@allcontributors

Copy link
Copy Markdown

@andersonhc

I've put up a pull request to add @RavSinghChandan! 🎉

@andersonhc
andersonhc merged commit 0b17a45 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