mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-30 17:37:09 +02:00
docs: remove unnecessary semicolon (#7000)
* docs: remove unnecessary semicolon The semicolon after the TOCInline component is unnecessary and actually gets rendered on screen. * ignore prettier Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
parent
e97f2529d6
commit
2dea99b5c8
1 changed files with 4 additions and 2 deletions
|
@ -13,10 +13,11 @@ Each Markdown document displays a table of contents on the top-right corner. But
|
|||
|
||||
The `toc` variable is available in any MDX document and contains all the headings of an MDX document. By default, only `h2` and `h3` headings are displayed in the TOC. You can change which heading levels are visible by setting `minHeadingLevel` or `maxHeadingLevel` for individual `TOCInline` components.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```jsx
|
||||
import TOCInline from '@theme/TOCInline';
|
||||
|
||||
<TOCInline toc={toc} />;
|
||||
<TOCInline toc={toc} />
|
||||
```
|
||||
|
||||
```mdx-code-block
|
||||
|
@ -41,6 +42,7 @@ type TOCItem = {
|
|||
|
||||
Note that the `toc` global is a flat array, so you can easily cut out unwanted nodes or insert extra nodes, and create a new TOC tree.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```jsx
|
||||
import TOCInline from '@theme/TOCInline';
|
||||
|
||||
|
@ -50,7 +52,7 @@ import TOCInline from '@theme/TOCInline';
|
|||
minHeadingLevel={2}
|
||||
// Show h4 headings in addition to the default h2 and h3 headings
|
||||
maxHeadingLevel={4}
|
||||
/>;
|
||||
/>
|
||||
```
|
||||
|
||||
```mdx-code-block
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue