@tsrx/core 0.1.53 → 0.1.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/plugin.js +7 -1
package/package.json
CHANGED
package/src/plugin.js
CHANGED
|
@@ -2440,9 +2440,15 @@ export function TSRXPlugin(config) {
|
|
|
2440
2440
|
}
|
|
2441
2441
|
// Statement-bodied native template attributes can leave the attribute's
|
|
2442
2442
|
// expression contexts above the still-open JSX tag context. Strip
|
|
2443
|
-
// those so a following `/>` stays in JSX opening-tag mode.
|
|
2443
|
+
// those so a following `/>` stays in JSX opening-tag mode. Once the
|
|
2444
|
+
// stack has unwound below the enclosing expression's depth the same
|
|
2445
|
+
// tail shape means something else: the `}` closed an inner child
|
|
2446
|
+
// container (its own brace context already popped) and the tc_expr
|
|
2447
|
+
// belongs to a still-open element between the attribute brace and
|
|
2448
|
+
// this one — stripping would drop the attribute container's brace.
|
|
2444
2449
|
if (
|
|
2445
2450
|
this.type === tt.braceR &&
|
|
2451
|
+
ctx.length >= enclosing_context_depth &&
|
|
2446
2452
|
top === tstc.tc_expr &&
|
|
2447
2453
|
second === b_expr &&
|
|
2448
2454
|
ctx[ci - 2] === tstc.tc_oTag
|