mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-22 13:37:05 +02:00
fix(theme): make warning a first-class admonition, and deprecate caution admonition (#9308)
This commit is contained in:
parent
58be496da2
commit
f5ae537d3e
339 changed files with 666 additions and 515 deletions
|
@ -80,7 +80,7 @@ Because a Prism theme is just a JS object, you can also write your own theme if
|
|||
|
||||
By default, Docusaurus comes with a subset of [commonly used languages](https://github.com/FormidableLabs/prism-react-renderer/blob/master/packages/generate-prism-languages/index.ts#L9-L23).
|
||||
|
||||
:::caution
|
||||
:::warning
|
||||
|
||||
Some popular languages like Java, C#, or PHP are not enabled by default.
|
||||
|
||||
|
@ -510,7 +510,7 @@ function Clock(props) {
|
|||
|
||||
### Imports {#imports}
|
||||
|
||||
:::caution react-live and imports
|
||||
:::warning react-live and imports
|
||||
|
||||
It is not possible to import components directly from the react-live code editor, you have to define available imports upfront.
|
||||
|
||||
|
@ -642,13 +642,13 @@ If you want to embed HTML markup such as anchor links or bold type, you can use
|
|||
</pre>
|
||||
</BrowserWindow>
|
||||
|
||||
:::caution MDX is whitespace insensitive
|
||||
:::warning MDX is whitespace insensitive
|
||||
|
||||
MDX is in line with JSX behavior: line break characters, even when inside `<pre>`, are turned into spaces. You have to explicitly write the new line character for it to be printed out.
|
||||
|
||||
:::
|
||||
|
||||
:::caution
|
||||
:::warning
|
||||
|
||||
Syntax highlighting only works on plain strings. Docusaurus will not attempt to parse code block content containing JSX children.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue