Skip to content

Document tag_callback customization and return semantics - #450

Open
saitakarcesme wants to merge 1 commit into
Alir3z4:masterfrom
saitakarcesme:codex/document-tag-callback
Open

saitakarcesme wants to merge 1 commit into
Alir3z4:masterfrom
saitakarcesme:codex/document-tag-callback

Conversation

@saitakarcesme

Copy link
Copy Markdown

Fixes #432.

Document how to assign tag_callback on an HTML2Text instance, its four arguments, and the exact True return value that bypasses default tag handling. Include an executable example that removes bold formatting while preserving the enclosed text and other tags, and explain how to restore default handling. Update the changelog and author list as requested by the contribution guide.

Validation on macOS / CPython 3.13.5:

  • Extracted and executed the example from docs/usage.md; its output assertion passes.
  • Checked opening/closing callback arguments, nested italic content, and resetting the callback to None against the current implementation.
  • Full pytest suite: 196 passed (3 PytestRemovedIn10Warning notices about existing generator parametrizations), 87% coverage with --cov=html2text.
  • git diff --check passes. No runtime code changed.

Prepared and validated with AI assistance (OpenAI Codex).

@saitakarcesme

Copy link
Copy Markdown
Author

CI follow-up: CI — status: action_required on the current head 2192c2e. These fork workflow runs have not started. Could a maintainer approve them so the change can be validated?

Status checked and follow-up prepared with Codex assistance.

This branch has not been deployed

No deployments
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.

tag_callback not documented?

1 participant