From 303a5ea898cd1df71a00caabd326c74940b379fc Mon Sep 17 00:00:00 2001
From: Jarred Sumner <jarred@jarredsumner.com>
Date: Wed, 3 Nov 2021 19:29:07 -0700
Subject: [JSX] Fix regression with JSX entities

---
 integration/snippets/jsx-spacing.jsx | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 integration/snippets/jsx-spacing.jsx

(limited to 'integration/snippets/jsx-spacing.jsx')

diff --git a/integration/snippets/jsx-spacing.jsx b/integration/snippets/jsx-spacing.jsx
new file mode 100644
index 000000000..73e31ebaa
--- /dev/null
+++ b/integration/snippets/jsx-spacing.jsx
@@ -0,0 +1,36 @@
+import * as ReactDOM from "react-dom/server";
+
+const Tester = ({ description }) => {
+  console.assert(
+    description ===
+      "foo\nbar \n\nbaz\n\nthis\ntest\n\nchecks\nnewlines\nare\ngood\nyeah\n\n",
+    "Expected description to be 'foo\\nbar \\n\\nbaz\\n\\nthis\\ntest\\n\\nchecks\\nnewlines\\nare\\ngood\\nyeah\\n\\n' but was '" +
+      description +
+      "'"
+  );
+
+  return description;
+};
+
+export function test() {
+  const foo = ReactDOM.renderToString(
+    <Tester
+      description="foo
+  bar 
+  
+  baz
+  
+  this
+  test
+  
+  checks
+  newlines
+  are
+  good
+  yeah
+  
+  "
+    ></Tester>
+  );
+  testDone(import.meta.url);
+}
-- 
cgit v1.2.3

