From 3c0d6b12eba5faf3cda1e49334ac3b10d9de2470 Mon Sep 17 00:00:00 2001 From: Tatsunori Uchino Date: Sat, 25 May 2024 23:23:38 +0900 Subject: [PATCH 1/4] docs: backport #10173 to v3.3 --- .../markdown-features-intro.mdx | 63 ++++++++++++------- 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/website/versioned_docs/version-3.3.2/guides/markdown-features/markdown-features-intro.mdx b/website/versioned_docs/version-3.3.2/guides/markdown-features/markdown-features-intro.mdx index b6bcd756beff..52a6866914b9 100644 --- a/website/versioned_docs/version-3.3.2/guides/markdown-features/markdown-features-intro.mdx +++ b/website/versioned_docs/version-3.3.2/guides/markdown-features/markdown-features-intro.mdx @@ -181,42 +181,57 @@ Markdown quotes are beautifully styled: Markdown can embed HTML elements, and [`details`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details) HTML elements are beautifully styled: -```md +{/* prettier-ignore */} +````md ### Details element example
Toggle me! -
-
This is the detailed content
-
-
- - Nested toggle! Some surprise inside... - -
😲😲😲😲😲
-
-
+ + This is the detailed content + + ```js + console.log("Markdown features including the code block are available"); + ``` + + You can use Markdown here including **bold** and _italic_ text, and [inline link](https://docusaurus.io) +
+ Nested toggle! Some surprise inside... + + 😲😲😲😲😲 +
-``` +```` -```mdx-code-block +````mdx-code-block

Details element example

Toggle me! -
-
This is the detailed content
-
-
- - Nested toggle! Some surprise inside... - -
😲😲😲😲😲
-
-
+ + This is the detailed content + + ```js + console.log("Markdown features including the code block are available"); + ``` + + You can use Markdown here including **bold** and _italic_ text, and [inline link](https://docusaurus.io) +
+ Nested toggle! Some surprise inside... + + 😲😲😲😲😲 +
-``` +```` + +:::info + +- You should not break lines between the starting or ending tag of the `` element and its content or an extra `

` element is inserted. +- Blank lines between the `

` element and the first paragraph of the detailed content are optional in Docusaurus but strongly recommended to ensure MDX portability with other site generators. +- Blank lines between the nested `
` element and the paragraphs just around it are optional. + +::: From fb7d740a81a1c73c7d5a4e0cb0bbe0fc52ace058 Mon Sep 17 00:00:00 2001 From: Tatsunori Uchino Date: Sun, 2 Jun 2024 23:57:37 +0900 Subject: [PATCH 2/4] Reword --- .../guides/markdown-features/markdown-features-intro.mdx | 6 +++--- .../guides/markdown-features/markdown-features-intro.mdx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/website/docs/guides/markdown-features/markdown-features-intro.mdx b/website/docs/guides/markdown-features/markdown-features-intro.mdx index 52a6866914b9..e2c6316e7b6b 100644 --- a/website/docs/guides/markdown-features/markdown-features-intro.mdx +++ b/website/docs/guides/markdown-features/markdown-features-intro.mdx @@ -230,8 +230,8 @@ Markdown can embed HTML elements, and [`details`](https://developer.mozilla.org/ :::info -- You should not break lines between the starting or ending tag of the `` element and its content or an extra `

` element is inserted. -- Blank lines between the `

` element and the first paragraph of the detailed content are optional in Docusaurus but strongly recommended to ensure MDX portability with other site generators. -- Blank lines between the nested `
` element and the paragraphs just around it are optional. +- You may want to keep your `` on a single line. [MDX creates extra HTML `

` paragraphs for line breaks.](https://mdxjs.com/migrating/v2/#jsx) +- You should add a blank line between the `

` element and the first paragraph of the detailed content, or React will emit a warning in the console in the DevTools: `Warning: validateDOMNesting(...): cannot appear as a descendant of

.` +- You can optionally add a blank line between the nested `

` element and the paragraphs just around the nested `
` to clarify the semantic boundary between the two. ::: diff --git a/website/versioned_docs/version-3.3.2/guides/markdown-features/markdown-features-intro.mdx b/website/versioned_docs/version-3.3.2/guides/markdown-features/markdown-features-intro.mdx index 52a6866914b9..e2c6316e7b6b 100644 --- a/website/versioned_docs/version-3.3.2/guides/markdown-features/markdown-features-intro.mdx +++ b/website/versioned_docs/version-3.3.2/guides/markdown-features/markdown-features-intro.mdx @@ -230,8 +230,8 @@ Markdown can embed HTML elements, and [`details`](https://developer.mozilla.org/ :::info -- You should not break lines between the starting or ending tag of the `` element and its content or an extra `

` element is inserted. -- Blank lines between the `

` element and the first paragraph of the detailed content are optional in Docusaurus but strongly recommended to ensure MDX portability with other site generators. -- Blank lines between the nested `
` element and the paragraphs just around it are optional. +- You may want to keep your `` on a single line. [MDX creates extra HTML `

` paragraphs for line breaks.](https://mdxjs.com/migrating/v2/#jsx) +- You should add a blank line between the `

` element and the first paragraph of the detailed content, or React will emit a warning in the console in the DevTools: `Warning: validateDOMNesting(...): cannot appear as a descendant of

.` +- You can optionally add a blank line between the nested `

` element and the paragraphs just around the nested `
` to clarify the semantic boundary between the two. ::: From 1fd9a76d5f2fcebd0e6e578bc7be27a5ed5353aa Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 21 Jun 2024 13:27:51 +0200 Subject: [PATCH 3/4] wording --- .../docs/guides/markdown-features/markdown-features-intro.mdx | 4 +--- .../guides/markdown-features/markdown-features-intro.mdx | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/website/docs/guides/markdown-features/markdown-features-intro.mdx b/website/docs/guides/markdown-features/markdown-features-intro.mdx index e2c6316e7b6b..4fcaef5e32cf 100644 --- a/website/docs/guides/markdown-features/markdown-features-intro.mdx +++ b/website/docs/guides/markdown-features/markdown-features-intro.mdx @@ -230,8 +230,6 @@ Markdown can embed HTML elements, and [`details`](https://developer.mozilla.org/ :::info -- You may want to keep your `` on a single line. [MDX creates extra HTML `

` paragraphs for line breaks.](https://mdxjs.com/migrating/v2/#jsx) -- You should add a blank line between the `

` element and the first paragraph of the detailed content, or React will emit a warning in the console in the DevTools: `Warning: validateDOMNesting(...): cannot appear as a descendant of

.` -- You can optionally add a blank line between the nested `

` element and the paragraphs just around the nested `
` to clarify the semantic boundary between the two. +You may want to keep your `` on a single line. Keep in mind that [MDX creates extra HTML `

` paragraphs for line breaks.](https://mdxjs.com/migrating/v2/#jsx). When in doubt, use the [MDX playground](https://mdxjs.com/playground/) to troubleshoot `

` rendering problems. ::: diff --git a/website/versioned_docs/version-3.3.2/guides/markdown-features/markdown-features-intro.mdx b/website/versioned_docs/version-3.3.2/guides/markdown-features/markdown-features-intro.mdx index e2c6316e7b6b..4fcaef5e32cf 100644 --- a/website/versioned_docs/version-3.3.2/guides/markdown-features/markdown-features-intro.mdx +++ b/website/versioned_docs/version-3.3.2/guides/markdown-features/markdown-features-intro.mdx @@ -230,8 +230,6 @@ Markdown can embed HTML elements, and [`details`](https://developer.mozilla.org/ :::info -- You may want to keep your `` on a single line. [MDX creates extra HTML `

` paragraphs for line breaks.](https://mdxjs.com/migrating/v2/#jsx) -- You should add a blank line between the `

` element and the first paragraph of the detailed content, or React will emit a warning in the console in the DevTools: `Warning: validateDOMNesting(...): cannot appear as a descendant of

.` -- You can optionally add a blank line between the nested `

` element and the paragraphs just around the nested `
` to clarify the semantic boundary between the two. +You may want to keep your `` on a single line. Keep in mind that [MDX creates extra HTML `

` paragraphs for line breaks.](https://mdxjs.com/migrating/v2/#jsx). When in doubt, use the [MDX playground](https://mdxjs.com/playground/) to troubleshoot `

` rendering problems. ::: From 7eb56d72bee674775070b5d5082d9746d78b72bc Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 21 Jun 2024 13:28:26 +0200 Subject: [PATCH 4/4] wording --- .../guides/markdown-features/markdown-features-intro.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/website/versioned_docs/version-3.4.0/guides/markdown-features/markdown-features-intro.mdx b/website/versioned_docs/version-3.4.0/guides/markdown-features/markdown-features-intro.mdx index 52a6866914b9..4fcaef5e32cf 100644 --- a/website/versioned_docs/version-3.4.0/guides/markdown-features/markdown-features-intro.mdx +++ b/website/versioned_docs/version-3.4.0/guides/markdown-features/markdown-features-intro.mdx @@ -230,8 +230,6 @@ Markdown can embed HTML elements, and [`details`](https://developer.mozilla.org/ :::info -- You should not break lines between the starting or ending tag of the `` element and its content or an extra `

` element is inserted. -- Blank lines between the `

` element and the first paragraph of the detailed content are optional in Docusaurus but strongly recommended to ensure MDX portability with other site generators. -- Blank lines between the nested `
` element and the paragraphs just around it are optional. +You may want to keep your `` on a single line. Keep in mind that [MDX creates extra HTML `

` paragraphs for line breaks.](https://mdxjs.com/migrating/v2/#jsx). When in doubt, use the [MDX playground](https://mdxjs.com/playground/) to troubleshoot `

` rendering problems. :::