docs: backport #10173 to v3.3 + v3.4 & revise the content (#10180)

Co-authored-by: sebastien <lorber.sebastien@gmail.com>
This commit is contained in:
Tatsunori Uchino 2024-06-21 20:43:48 +09:00 committed by GitHub
parent 3a0a2a74b8
commit 91cef6226a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 40 additions and 31 deletions

View file

@ -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 `<summary>` element and its content or an extra `<p>` element is inserted.
- Blank lines between the `<summary>` 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 `<details>` element and the paragraphs just around it are optional.
You may want to keep your `<summary>` on a single line. Keep in mind that [MDX creates extra HTML `<p>` paragraphs for line breaks.](https://mdxjs.com/migrating/v2/#jsx). When in doubt, use the [MDX playground](https://mdxjs.com/playground/) to troubleshoot `<details>` rendering problems.
:::