diff options
Diffstat (limited to 'packages/astro/src')
-rw-r--r-- | packages/astro/src/compiler/codegen/index.ts | 6 | ||||
-rw-r--r-- | packages/astro/src/dev.ts | 1 | ||||
-rw-r--r-- | packages/astro/src/external.ts | 2 | ||||
-rw-r--r-- | packages/astro/src/frontend/markdown.ts | 1 |
4 files changed, 9 insertions, 1 deletions
diff --git a/packages/astro/src/compiler/codegen/index.ts b/packages/astro/src/compiler/codegen/index.ts index 68ff8d853..a37861a28 100644 --- a/packages/astro/src/compiler/codegen/index.ts +++ b/packages/astro/src/compiler/codegen/index.ts @@ -557,6 +557,12 @@ async function compileHtml(enterNode: TemplateNode, state: CodegenState, compile if (componentName === 'Markdown') { const { $scope } = attributes ?? {}; state.markers.insideMarkdown = { $scope }; + if (attributes.content) { + if (curr === 'markdown') { + await pushMarkdownToBuffer(); + } + buffers[curr] += `,${componentName}.__render(${attributes ? generateAttributes(attributes) : 'null'}),`; + } curr = 'markdown'; return; } diff --git a/packages/astro/src/dev.ts b/packages/astro/src/dev.ts index 5d1f20cff..a7da0c863 100644 --- a/packages/astro/src/dev.ts +++ b/packages/astro/src/dev.ts @@ -33,6 +33,7 @@ export default async function dev(astroConfig: AstroConfig) { const server = http.createServer(async (req, res) => { timer.load = performance.now(); + const result = await runtime.load(req.url); debug(logging, 'dev', `loaded ${req.url} [${stopTimer(timer.load)}]`); diff --git a/packages/astro/src/external.ts b/packages/astro/src/external.ts index f8ae0e23c..63abeffad 100644 --- a/packages/astro/src/external.ts +++ b/packages/astro/src/external.ts @@ -17,7 +17,7 @@ const isAstroRenderer = (name: string) => { // These packages should NOT be built by `esinstall` // But might not be explicit dependencies of `astro` -const denyList = ['prismjs/components/index.js', '@vue/server-renderer']; +const denyList = ['prismjs/components/index.js', '@vue/server-renderer', 'astro/dist/frontend/markdown.js']; export default Object.keys(pkg.dependencies) // Filter out packages that should be loaded threw Snowpack diff --git a/packages/astro/src/frontend/markdown.ts b/packages/astro/src/frontend/markdown.ts new file mode 100644 index 000000000..3a446092f --- /dev/null +++ b/packages/astro/src/frontend/markdown.ts @@ -0,0 +1 @@ +export { renderMarkdown } from '../compiler/utils';
\ No newline at end of file |