diff options
author | 2021-06-29 15:33:56 -0500 | |
---|---|---|
committer | 2021-06-29 15:33:56 -0500 | |
commit | f721275f33ca96464d3dc651f89127cd90dff796 (patch) | |
tree | 861595cddf4f7b251a02f21e4f0948d1d53b502f /examples/with-markdown/src | |
parent | 8b4760c24ffc0e6920f77efb4f0b4435f670f198 (diff) | |
download | astro-f721275f33ca96464d3dc651f89127cd90dff796.tar.gz astro-f721275f33ca96464d3dc651f89127cd90dff796.tar.zst astro-f721275f33ca96464d3dc651f89127cd90dff796.zip |
Fix `<Markdown {content} />` closing parent tag (#575)
* test(#494): add failing test
* chore: update with-markdown example
* fix(#494): avoid early close with <Markdown content />
* chore: add changeset
Diffstat (limited to 'examples/with-markdown/src')
-rw-r--r-- | examples/with-markdown/src/layouts/main.astro | 1 | ||||
-rw-r--r-- | examples/with-markdown/src/pages/external.astro | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/examples/with-markdown/src/layouts/main.astro b/examples/with-markdown/src/layouts/main.astro index 26993bcaf..c3ef56d60 100644 --- a/examples/with-markdown/src/layouts/main.astro +++ b/examples/with-markdown/src/layouts/main.astro @@ -1,4 +1,5 @@ --- +const { content } = Astro.props; --- <html> diff --git a/examples/with-markdown/src/pages/external.astro b/examples/with-markdown/src/pages/external.astro new file mode 100644 index 000000000..1149666b2 --- /dev/null +++ b/examples/with-markdown/src/pages/external.astro @@ -0,0 +1,17 @@ +--- +import { Markdown } from 'astro/components'; +import Layout from '../layouts/main.astro'; + +const title = `External Markdown`; +const content = `Markdown *content* to render`; +--- + +<Layout content={{ title }}> + <main> + <div> + <Markdown {content} /> + <p>Some other stuff</p> + </div> + <p>Lastly...</p> + </main> +</Layout> |