diff --git a/scripts/sandbox/templates/item.ejs b/scripts/sandbox/templates/item.ejs index fdea04cfa69..dbd364ef8c4 100644 --- a/scripts/sandbox/templates/item.ejs +++ b/scripts/sandbox/templates/item.ejs @@ -1,8 +1,12 @@ -

<%= name %>

+

+ <%= name %> +

This is project generated to serve as a reproduction starter for Storybook.

-View it in Stackblitz + + View it in Stackblitz +

Testing instructions

@@ -14,5 +18,4 @@

Run Storybook:

   yarn storybook
-
- + \ No newline at end of file diff --git a/scripts/sandbox/utils/template.ts b/scripts/sandbox/utils/template.ts index b5c75dcf110..4cc3723827f 100644 --- a/scripts/sandbox/utils/template.ts +++ b/scripts/sandbox/utils/template.ts @@ -9,7 +9,12 @@ export async function renderTemplate(templatePath: string, templateData: Record< const output = format(render(template, templateData), { parser: 'html', - }).replace(new RegExp('\\n\\n', 'g'), '\n'); + }) + // overly complicated regex replacements to fix prettier's bad formatting + .replace(new RegExp('\\n\\n', 'g'), '\n') + .replace(new RegExp('', 'g'), 'node=">') + .replace(new RegExp('/\\n/', 'g'), ''); return output; }