Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2327,7 +2327,7 @@ function codegenJsxAttribute(
}
}

const JSX_TEXT_CHILD_REQUIRES_EXPR_CONTAINER_PATTERN = /[<>&]/;
const JSX_TEXT_CHILD_REQUIRES_EXPR_CONTAINER_PATTERN = /[<>&{}]/;
function codegenJsxElement(
cx: Context,
place: Place,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

## Input

```javascript
function Test() {
return (
<div>
If the string contains the string &#123;pageNumber&#125; it will be
replaced by the page number.
</div>
);
}

export const FIXTURE_ENTRYPOINT = {
fn: Test,
params: [],
};

```

## Code

```javascript
import { c as _c } from "react/compiler-runtime";
function Test() {
const $ = _c(1);
let t0;
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
t0 = (
<div>
{
"If the string contains the string {pageNumber} it will be replaced by the page number."
}
</div>
);
$[0] = t0;
} else {
t0 = $[0];
}
return t0;
}

export const FIXTURE_ENTRYPOINT = {
fn: Test,
params: [],
};

```

### Eval output
(kind: ok) <div>If the string contains the string {pageNumber} it will be replaced by the page number.</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function Test() {
return (
<div>
If the string contains the string &#123;pageNumber&#125; it will be
replaced by the page number.
</div>
);
}

export const FIXTURE_ENTRYPOINT = {
fn: Test,
params: [],
};
Loading