Skip to content

Commit

Permalink
docs: remove unnecessary semicolon (#7000)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
imsingh and Josh-Cena authored Mar 25, 2022
1 parent e97f252 commit 2dea99b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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';

Expand All @@ -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
Expand Down

0 comments on commit 2dea99b

Please sign in to comment.