-
- Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Describe the bug
The input below, particularly the </span>=, breaks the parser
Input code
function Test() { return ( <Y elements={[ <> <span>x</span>= <br/> </>, true ]} /> ); }Config
{ "jsc": { "parser": { "syntax": "ecmascript", "jsx": true }, "target": "es2024", "loose": false, "minify": { "compress": false, "mangle": false } }, "module": { "type": "es6" }, "minify": false, "isModule": true }Link to the code that reproduces this issue
SWC Info output
No response
Expected behavior
Works
Actual behavior
x Expression expected ,-[input.jsx:6:1] 3 | <Y 4 | elements={[ 5 | <> 6 | <span>x</span>= : ^^ 7 | <br/> 8 | </>, 9 | true `---- x Unterminated regexp literal ,-[input.jsx:8:1] 5 | <> 6 | <span>x</span>= 7 | <br/> 8 | </>, : ^^^ 9 | true 10 | ]} 11 | /> `---- Caused by: 0: failed to process js file 1: Syntax Error Version
1.12.6
Additional context
No response