Skip to content
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

chore(template-compiler): normalize class and style attribute values #4553

Merged
merged 8 commits into from
Sep 17, 2024

Conversation

ekashida
Copy link
Member

Details

Fixes #4124

Does this pull request introduce a breaking change?

  • 💔 Yes, it does introduce a breaking change.

Does this pull request introduce an observable change?

  • 🔬 Yes, it does include an observable change.

GUS work item

W-16419702

@ekashida ekashida requested a review from a team as a code owner September 16, 2024 18:56
@@ -1,7 +1,7 @@
import _implicitStylesheets from "./static-content-optimization.css";
import _implicitScopedStylesheets from "./static-content-optimization.scoped.css?scoped=true";
import { freezeTemplate, parseFragment, registerTemplate } from "lwc";
const $fragment1 = parseFragment`<div${3}><span${"a1:data-dynamic"}${3}></span><span data-static="bar"${3}></span><span${"s3"}${3}></span><span style="quux"${3}></span><span${3}>${"t6"}</span><span${"a7:data-dynamic"}${"s7"}${"c7"}${2}>${"t8"}</span></div>`;
const $fragment1 = parseFragment`<div${3}><span${"a1:data-dynamic"}${3}></span><span data-static="bar"${3}></span><span${"s3"}${3}></span><span style=""${3}></span><span${3}>${"t6"}</span><span${"a7:data-dynamic"}${"s7"}${"c7"}${2}>${"t8"}</span></div>`;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to remove the style attribute in the case where its value is an empty string.

@ekashida ekashida enabled auto-merge (squash) September 17, 2024 23:29
@ekashida ekashida merged commit e9480f5 into master Sep 17, 2024
11 checks passed
@ekashida ekashida deleted the raptor/normalize-static-attributes branch September 17, 2024 23:29
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.

Normalize whitespace for attributes (breaking change)
3 participants