From befa03cb87a57eb1b584a3f832f70e880942b55f Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 11 May 2022 10:38:24 +0800 Subject: [PATCH] fix(mdx-loader): use React.Fragment as fragment factory --- packages/docusaurus-mdx-loader/src/loader.ts | 2 +- website/_dogfooding/_pages tests/markdownPageTests.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus-mdx-loader/src/loader.ts b/packages/docusaurus-mdx-loader/src/loader.ts index af18cd398262..68c3f55f904b 100644 --- a/packages/docusaurus-mdx-loader/src/loader.ts +++ b/packages/docusaurus-mdx-loader/src/loader.ts @@ -31,7 +31,7 @@ const { const pragma = ` /* @jsxRuntime classic */ /* @jsx mdx */ -/* @jsxFrag mdx.Fragment */ +/* @jsxFrag React.Fragment */ `; const DEFAULT_OPTIONS: MDXOptions = { diff --git a/website/_dogfooding/_pages tests/markdownPageTests.md b/website/_dogfooding/_pages tests/markdownPageTests.md index bbd5c90e67ce..ca7e9fcff7d2 100644 --- a/website/_dogfooding/_pages tests/markdownPageTests.md +++ b/website/_dogfooding/_pages tests/markdownPageTests.md @@ -183,3 +183,9 @@ Code tag + double pipe: || Details without a summary + +This is a fragment: + +<>Hello + +It should work :)