Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Nov 29, 2022
1 parent 65c8496 commit 780930f
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 4 deletions.
@@ -0,0 +1,11 @@
import React from 'react';

export default function App() {
return (
<div className="App">
<h1>Welcome to my application!</h1>
This is my app!
<strong>MINE.</strong>
</div>
)
}
@@ -0,0 +1,5 @@
{
"sourceType": "module",
"plugins": [["transform-react-jsx", { "runtime": "classic" }]],
"sourceMap": true
}
@@ -0,0 +1,6 @@
import React from 'react';
export default function App() {
return /*#__PURE__*/React.createElement("div", {
className: "App"
}, /*#__PURE__*/React.createElement("h1", null, "Welcome to my application!"), "This is my app!", /*#__PURE__*/React.createElement("strong", null, "MINE."));
}
@@ -0,0 +1,14 @@
{
"version": 3,
"names": [
"React",
"App"
],
"sources": [
"sourcemaps/JSXText/input.js"
],
"sourcesContent": [
"import React from 'react';\n\nexport default function App() {\n return (\n <div className=\"App\">\n <h1>Welcome to my application!</h1>\n This is my app!\n <strong>MINE.</strong>\n </div>\n )\n}"
],
"mappings": "AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,eAAe,SAASC,GAAG,GAAG;EAC5B,oBACE;IAAK,SAAS,EAAC;EAAK,gBAClB,gCAAI,4BAA0B,CAAK,mBAEnC,mDAAQ,OAAK,CAAS,CAClB;AAEV"
}
@@ -1,10 +1,9 @@
import { stringLiteral } from "../../builders/generated";
import type * as t from "../..";
import { inherits } from "../..";

export default function cleanJSXElementLiteralChild(
child: {
value: string;
},
child: t.JSXText,
args: Array<t.Node>,
) {
const lines = child.value.split(/\r\n|\n|\r/);
Expand Down Expand Up @@ -48,5 +47,5 @@ export default function cleanJSXElementLiteralChild(
}
}

if (str) args.push(stringLiteral(str));
if (str) args.push(inherits(stringLiteral(str), child));
}

0 comments on commit 780930f

Please sign in to comment.