Skip to content

Fix trailing whitespace before extracted style tags#1136

Open
matthewp wants to merge 2 commits intomainfrom
fix/issue-1065
Open

Fix trailing whitespace before extracted style tags#1136
matthewp wants to merge 2 commits intomainfrom
fix/issue-1065

Conversation

@matthewp
Copy link
Contributor

@matthewp matthewp commented Feb 2, 2026

Changes

Testing

Added test case in TestTransformTrailingSpace to verify trailing whitespace before style tags is removed.

Docs

Bug fix only, no docs needed.

When a style tag is extracted from the document, any preceding
whitespace-only text node is now also removed if it would become
trailing whitespace.

Fixes #1065
@changeset-bot
Copy link

changeset-bot bot commented Feb 2, 2026

🦋 Changeset detected

Latest commit: ac6c13b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/compiler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@matthewp matthewp marked this pull request as draft February 3, 2026 13:12
@matthewp matthewp marked this pull request as ready for review February 5, 2026 19:27
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.

Slots remove whitespace where it shouldn't when <style> is used

1 participant