Skip to content

Apply document formatting to Tag conversion inputs - #278

Closed
be-student wants to merge 1 commit into
matthewwithanm:developfrom
be-student:codex/209-tag-document-stripping
Closed

Apply document formatting to Tag conversion inputs#278
be-student wants to merge 1 commit into
matthewwithanm:developfrom
be-student:codex/209-tag-document-stripping

Conversation

@be-student

Copy link
Copy Markdown

Fixes #209.

Apply the existing document conversion hook when convert_soup() receives an individual Tag. Previously strip_document only ran for a BeautifulSoup [document] node, so Tag inputs retained separation newlines and skipped option validation. Keep the hook running exactly once and honor existing converter exclusions.

Validation: three new regression tests fail before the fix; all 87 tests pass afterward. Coverage includes all stripping modes across several root tags, internal paragraph spacing, custom hooks, invalid options, exclusions, and preservation of the source tree. Flake8, README reStructuredText lint, and diff checks pass on Python 3.12/macOS.

@be-student be-student closed this Sep 12, 2026
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.

The strip_document option works on BeautifulSoup objects but not Tag objects

1 participant