Skip to content

Commit

Permalink
fix(core): wrap page content to avoid issues of fragment (close #688)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed May 25, 2022
1 parent 4f5a9af commit fb76656
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -11,7 +11,8 @@ export const preparePageComponent = async (
page.componentFilePathRelative,
[
// take the rendered markdown content as <template>
`<template>${page.contentRendered}</template>\n`,
// #688: wrap the content with a <div> to avoid some potential issues of fragment component
`<template><div>${page.contentRendered}</div></template>\n`,
// hoist `<script>`, `<style>` and other custom blocks
...page.hoistedTags,
].join('\n')
Expand Down

0 comments on commit fb76656

Please sign in to comment.