@tsrx/core 0.1.44 → 0.1.45

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 +6 -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.44",
6
+ "version": "0.1.45",
7
7
  "type": "module",
8
8
  "repository": {
9
9
  "type": "git",
package/src/plugin.js CHANGED
@@ -4153,7 +4153,12 @@ export function TSRXPlugin(config) {
4153
4153
  chunkStart = this.pos;
4154
4154
  break;
4155
4155
  }
4156
- if (this.#shouldReadTemplateRawTextToken()) {
4156
+ // Like the default case below, a slash joins the raw text run even
4157
+ // when the element is nested inside a `{ … }` expression container
4158
+ // (`{cond && (<a>x/y</a>)}`, `{a}/{b}` between child expressions).
4159
+ // Bailing to JS tokenization here would read the `/` as the start
4160
+ // of a regular expression.
4161
+ if (this.#shouldReadTemplateRawTextToken(true)) {
4157
4162
  ++this.pos;
4158
4163
  break;
4159
4164
  }