[ci] format

This commit is contained in:
FredKSchott 2022-03-24 19:32:18 +00:00 committed by GitHub Actions
parent 823d55fe46
commit bababd8461
3 changed files with 4 additions and 6 deletions

View file

@ -1,5 +1,5 @@
---
title: "Markdown + Tailwind"
title: 'Markdown + Tailwind'
setup: |
import Button from '../components/Button.astro';
---

View file

@ -17,7 +17,6 @@ import { getOutFile, getOutFolder, getOutRoot } from './common.js';
import type { PageBuildData, StaticBuildOptions } from './types';
import { getTimeStat } from './util.js';
// Render is usually compute, which Node.js can't parallelize well.
// In real world testing, dropping from 10->1 showed a notiable perf
// improvement. In the future, we can revisit a smarter parallel

View file

@ -46,7 +46,7 @@ export default function markdown({ config }: AstroPluginOptions): Plugin {
const filename = normalizeFilename(id);
const fileUrl = new URL(`file://${filename}`);
const isPage = fileUrl.pathname.startsWith(config.pages.pathname);
const hasInjectedScript = (isPage && config._ctx.scripts.some((s) => s.stage === 'page-ssr'));
const hasInjectedScript = isPage && config._ctx.scripts.some((s) => s.stage === 'page-ssr');
// Extract special frontmatter keys
const { layout = '', components = '', setup = '', ...content } = frontmatter;
@ -68,7 +68,6 @@ ${setup}`.trim();
astroResult = `${prelude}\n${astroResult}`;
}
// Transform from `.astro` to valid `.ts`
let { code: tsResult } = await transform(astroResult, {
pathname: fileUrl.pathname.substr(config.projectRoot.pathname.length - 1),