Skip to content

Add an option to remove tags with their contents - #314

Open
Aschenbath wants to merge 1 commit into
matthewwithanm:developfrom
Aschenbath:codex/oss20e-20261122-markdownify-decompose
Open

Aschenbath wants to merge 1 commit into
matthewwithanm:developfrom
Aschenbath:codex/oss20e-20261122-markdownify-decompose

Conversation

@Aschenbath

Copy link
Copy Markdown

Fixes #259.

Add decompose=[...] and --decompose to skip selected subtrees before visiting descendants. This takes precedence over strip/convert without mutating the supplied BeautifulSoup object. Document the distinction from strip and the existing default handling of script/style.

Validation: all five new tests failed before implementation; all 100 tests pass after it, including CLI, precedence, root-tag and non-mutation cases. Focused Ruff passes.

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.

strip option preserves inner text of removed tags — request for content-removing option

1 participant