+
Skip to content

fix(format/html): fix mangling of embedded language tags if whitespaceSensitivity is strict #6673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2025

Conversation

dyc3
Copy link
Contributor

@dyc3 dyc3 commented Jul 2, 2025

Summary

When this option is set to strict, it means all tags are whitespace sensitive. This means that every element's children tries to "borrow" the parent element's opening tag > and closing tag. Normally, this would be "given" to the element list formatter to print, however for verbatim elements like embedded language tags, we avoid invoking the element list formatter entirely in favor of just printing it verbatim.

Now we never borrow these tokens if the element is a verbatim element.

fixes #6453

Test Plan

Copy link

changeset-bot bot commented Jul 2, 2025

🦋 Changeset detected

Latest commit: ea8e60c

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

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc 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

@github-actions github-actions bot added A-Formatter Area: formatter L-HTML Language: HTML labels Jul 2, 2025
Copy link

codspeed-hq bot commented Jul 2, 2025

CodSpeed Performance Report

Merging #6673 will not alter performance

Comparing dyc3/fix-strict-verbatim-element-mangling (ea8e60c) with main (af78d6d)

Summary

✅ 114 untouched benchmarks

@dyc3 dyc3 force-pushed the dyc3/fix-strict-verbatim-element-mangling branch from 3819428 to ea8e60c Compare July 2, 2025 21:43
@dyc3 dyc3 merged commit 341e062 into main Jul 3, 2025
28 checks passed
@dyc3 dyc3 deleted the dyc3/fix-strict-verbatim-element-mangling branch July 3, 2025 13:32
@github-actions github-actions bot mentioned this pull request Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter L-HTML Language: HTML
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📝 "whitespaceSensitivity": "strict" mangles <style> tags
2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载