Skip to content

Apply document formatting to Tag conversion roots - #305

Open
Aschenbath wants to merge 1 commit into
matthewwithanm:developfrom
Aschenbath:fix/tag-root-formatting-209-20261120
Open

Aschenbath wants to merge 1 commit into
matthewwithanm:developfrom
Aschenbath:fix/tag-root-formatting-209-20261120

Conversation

@Aschenbath

Copy link
Copy Markdown

convert_soup() applies strip_document to BeautifulSoup documents but leaves surrounding newlines on Tag inputs. Apply the document converter once after converting a Tag root, honoring custom converters and tag filters.

Fixes #209; revisits the closed #278 and #285. All 109 tests pass on Windows/Python 3.12 with the configured pytest 8; ten regression cases fail before the fix. Flake8 and README validation pass.

AI-assisted implementation and validation.

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