mirror of
https://github.com/hanzoai/swc.git
synced 2026-10-30 19:42:53 +00:00
## Summary - preserve line terminators in quoted JSX attribute literals instead of folding them like JSX text - add parser, React transform, and end-to-end regressions for issue #11550 ## Why `transform_jsx_attr_str` was normalizing quoted JSX attribute strings with JSX text whitespace rules, even though the parser already preserved the original line terminators. That changed `"bruh\nbruh"` into `"bruh bruh"` and could cause downstream hydration mismatches. ## Impact Quoted JSX attributes like `data-anything="bruh\nbruh"` now compile to JS strings that preserve the embedded newline, matching Babel/TypeScript behavior. Fixes #11550