Skip to content

Commit

Permalink
fix: keep escaped string on _text
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Sep 28, 2024
1 parent 7ac77ab commit 67ec5f0
Show file tree
Hide file tree
Showing 25 changed files with 65 additions and 64 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/__tests__/__snapshots__/alpine.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ exports[`Alpine.js > jsx > Javascript Test > Basic 1`] = `
x-on:change=\\"name = myEvent.target.value\\"
/>
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! >
</div>
<script>
document.addEventListener(\\"alpine:init\\", () => {
Expand Down Expand Up @@ -2813,7 +2813,7 @@ exports[`Alpine.js > jsx > Typescript Test > Basic 1`] = `
x-on:change=\\"name = myEvent.target.value\\"
/>
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
<script>
document.addEventListener(\\"alpine:init\\", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const DEFAULT_VALUES = {
(input)=\\"name = $event.target.value\\"
/>

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
\`,
styles: [
Expand Down Expand Up @@ -6937,7 +6937,7 @@ export const DEFAULT_VALUES = {
(input)=\\"name = $event.target.value\\"
/>

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
\`,
styles: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const DEFAULT_VALUES = {
(input)=\\"name = $event.target.value\\"
/>

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
\`,
styles: [
Expand Down Expand Up @@ -7051,7 +7051,7 @@ export const DEFAULT_VALUES = {
(input)=\\"name = $event.target.value\\"
/>

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
\`,
styles: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const DEFAULT_VALUES = {
(input)=\\"name = $event.target.value\\"
/>

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
\`,
styles: [
Expand Down Expand Up @@ -7163,7 +7163,7 @@ export const DEFAULT_VALUES = {
(input)=\\"name = $event.target.value\\"
/>

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
\`,
styles: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const DEFAULT_VALUES = {
(input)=\\"name = $event.target.value\\"
/>

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
\`,
styles: [
Expand Down Expand Up @@ -6217,7 +6217,7 @@ export const DEFAULT_VALUES = {
(input)=\\"name = $event.target.value\\"
/>

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
\`,
styles: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const DEFAULT_VALUES = {
(input)=\\"name = $event.target.value\\"
/>

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
\`,
styles: [
Expand Down Expand Up @@ -256,7 +256,7 @@ export const DEFAULT_VALUES = {
(input)=\\"name = $event.target.value\\"
/>

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
\`,
styles: [
Expand Down Expand Up @@ -13023,7 +13023,7 @@ export const DEFAULT_VALUES = {
(input)=\\"name = $event.target.value\\"
/>

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
\`,
styles: [
Expand Down Expand Up @@ -13125,7 +13125,7 @@ export const DEFAULT_VALUES = {
(input)=\\"name = $event.target.value\\"
/>

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
\`,
styles: [
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/__tests__/__snapshots__/html.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ exports[`Html > jsx > Javascript Test > Basic 1`] = `
"<div class=\\"test div\\">
<input data-el=\\"input-1\\" data-dom-state=\\"input-2\\" />

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
<style>
.div {
Expand Down Expand Up @@ -6955,7 +6955,7 @@ exports[`Html > jsx > Typescript Test > Basic 1`] = `
"<div class=\\"test div\\">
<input data-el=\\"input-1\\" data-dom-state=\\"input-2\\" />

Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
<style>
.div {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/__tests__/__snapshots__/liquid.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports[`Liquid > jsx > Javascript Test > Basic 1`] = `
"<div class=\\"test div\\">
<input />
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
<style>
.div {
Expand Down Expand Up @@ -922,7 +922,7 @@ exports[`Liquid > jsx > Typescript Test > Basic 1`] = `
"<div class=\\"test div\\">
<input />
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
<style>
.div {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/__tests__/__snapshots__/lit.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default class MyBasicComponent extends LitElement {
) =>
(this.name =
myEvent.target.value)} /> Hello! I can run in React, Vue, Solid, or
Liquid!
Liquid! &gt;
</div>

\`;
Expand Down Expand Up @@ -4262,7 +4262,7 @@ export default class MyBasicComponent extends LitElement {
) =>
(this.name =
myEvent.target.value)} /> Hello! I can run in React, Vue, Solid, or
Liquid!
Liquid! &gt;
</div>

\`;
Expand Down
12 changes: 6 additions & 6 deletions packages/core/src/__tests__/__snapshots__/marko.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,17 @@ class {
}
style {
.div-724f419e {
.div-360ae4be {
padding: 10px;
}
}
<div class=\\"test div-724f419e\\">
<div class=\\"test div-360ae4be\\">
<input
value=(DEFAULT_VALUES.name || state.name)
on-input(myEvent => state.name = myEvent.target.value)
/>
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>"
`;
Expand Down Expand Up @@ -2565,17 +2565,17 @@ class {
}
style {
.div-f70acf48 {
.div-11706802 {
padding: 10px;
}
}
<div class=\\"test div-f70acf48\\">
<div class=\\"test div-11706802\\">
<input
value=(DEFAULT_VALUES.name || state.name)
on-input(myEvent => state.name = myEvent.target.value)
/>
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>"
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ exports[`Parse JSX > Javascript > Basic 1`] = `
"name": "div",
"properties": {
"_text": "
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
",
},
"scope": {},
Expand Down Expand Up @@ -11154,7 +11154,7 @@ exports[`Parse JSX > Typescript > Basic 1`] = `
"name": "div",
"properties": {
"_text": "
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
",
},
"scope": {},
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/__tests__/__snapshots__/preact.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function MyBasicComponent(props) {
value={DEFAULT_VALUES.name || name}
onChange={(myEvent) => setName(myEvent.target.value)}
/>
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
<style jsx>{\`
.div {
Expand Down Expand Up @@ -3497,7 +3497,7 @@ function MyBasicComponent(props: MyBasicComponentProps) {
value={DEFAULT_VALUES.name || name}
onChange={(myEvent) => setName(myEvent.target.value)}
/>
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
<style jsx>{\`
.div {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/__tests__/__snapshots__/qwik.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@ export const MyBasicComponent = component$((props) => {
value={DEFAULT_VALUES.name || state.name}
onChange$={$((event) => (state.name = myEvent.target.value))}
/>
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
);
});
Expand Down Expand Up @@ -5067,7 +5067,7 @@ export const MyBasicComponent = component$((props: MyBasicComponentProps) => {
value={DEFAULT_VALUES.name || state.name}
onChange$={$((event) => (state.name = myEvent.target.value))}
/>
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function MyBasicComponent(props) {
value={DEFAULT_VALUES.name || name}
onChange={(myEvent) => setName(myEvent.target.value)}
/>
<Text>Hello! I can run in React, Vue, Solid, or Liquid!</Text>
<Text>Hello! I can run in React, Vue, Solid, or Liquid! &gt;</Text>
</View>
);
}
Expand Down Expand Up @@ -4845,7 +4845,7 @@ function MyBasicComponent(props: MyBasicComponentProps) {
value={DEFAULT_VALUES.name || name}
onChange={(myEvent) => setName(myEvent.target.value)}
/>
<Text>Hello! I can run in React, Vue, Solid, or Liquid!</Text>
<Text>Hello! I can run in React, Vue, Solid, or Liquid! &gt;</Text>
</View>
);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/__tests__/__snapshots__/react.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function MyBasicComponent(props) {
value={DEFAULT_VALUES.name || name}
onChange={(myEvent) => setName(myEvent.target.value)}
/>
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
<style jsx>{\`
.div {
Expand Down Expand Up @@ -3401,7 +3401,7 @@ function MyBasicComponent(props: MyBasicComponentProps) {
value={DEFAULT_VALUES.name || name}
onChange={(myEvent) => setName(myEvent.target.value)}
/>
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
<style jsx>{\`
.div {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/__tests__/__snapshots__/rsc.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function MyBasicComponent(props) {
value={DEFAULT_VALUES.name || name}
onChange={(myEvent) => setName(myEvent.target.value)}
/>
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
<style jsx>{\`
.div {
Expand Down Expand Up @@ -3143,7 +3143,7 @@ function MyBasicComponent(props: MyBasicComponentProps) {
value={DEFAULT_VALUES.name || name}
onChange={(myEvent) => setName(myEvent.target.value)}
/>
Hello! I can run in React, Vue, Solid, or Liquid!
Hello! I can run in React, Vue, Solid, or Liquid! &gt;
</div>
<style jsx>{\`
.div {
Expand Down
Loading

0 comments on commit 67ec5f0

Please sign in to comment.