Commit 4dc5764
committed
Fix JSX expression regex to handle nested braces
Replace simple regex pattern that failed on nested braces with
existing BRACE_PATTERN that properly handles up to 3 levels of
nesting. This fixes issues with expressions like {obj || {default: true}}
and {items.map(x => ({a: x}))} where stray closing braces would remain
in the output.1 parent 2055fee commit 4dc5764
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments