0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

[ci] yarn format

This commit is contained in:
natemoo-re 2021-11-19 19:51:00 +00:00 committed by GitHub Actions
parent 9bc914f7a0
commit 447d2efaff

View file

@ -42,8 +42,8 @@ ${components ? `import * from '${components}';` : ''}
${setup} ${setup}
const $$content = ${JSON.stringify(content)} const $$content = ${JSON.stringify(content)}
---`; ---`;
const imports = `${layout ? `import Layout from '${layout}';` : ''} const imports = `${layout ? `import Layout from '${layout}';` : ''}
${setup}`.trim() ${setup}`.trim();
// If the user imported "Layout", wrap the content in a Layout // If the user imported "Layout", wrap the content in a Layout
if (/\bLayout\b/.test(imports)) { if (/\bLayout\b/.test(imports)) {
astroResult = `${prelude}\n<Layout content={$$content}>\n\n${astroResult}\n\n</Layout>`; astroResult = `${prelude}\n<Layout content={$$content}>\n\n${astroResult}\n\n</Layout>`;