@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/plugin.js +7 -1
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Core compiler infrastructure for TSRX syntax",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.1.53",
6
+ "version": "0.1.54",
7
7
  "type": "module",
8
8
  "repository": {
9
9
  "type": "git",
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