Skip to content

Commit bbf0d47

Browse files
committed
fix: apply formatter to fix linting issues
1 parent de83a33 commit bbf0d47

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

readme.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ React component to render markdown.
5151
* [Compatibility](#compatibility)
5252
* [Architecture](#architecture)
5353
* [Appendix A: HTML in markdown](#appendix-a-html-in-markdown)
54+
* [Using rehype-raw with TypeScript](#using-rehype-raw-with-typescript)
55+
* [Security considerations with rehype-raw](#security-considerations-with-rehype-raw)
56+
* [Common mistakes](#common-mistakes)
5457
* [Appendix B: Components](#appendix-b-components)
5558
* [Appendix C: line endings in markdown (and JSX)](#appendix-c-line-endings-in-markdown-and-jsx)
5659
* [Security](#security)
@@ -737,20 +740,23 @@ function App() {
737740
### Common mistakes
738741

739742
**Don't** use rehype plugins in `remarkPlugins`:
743+
740744
```js
741745
// Wrong - this will not work
742746
<Markdown remarkPlugins={[rehypeRaw]}>
743747
```
744748

745749
**Do** use rehype plugins in `rehypePlugins`:
750+
746751
```js
747752
// Correct
748753
<Markdown rehypePlugins={[rehypeRaw]}>
749754
```
750755

751756
This is a common mistake because both remark and rehype are part of the unified ecosystem, but they process different stages of the content:
752-
- **remark plugins** process markdown (mdast)
753-
- **rehype plugins** process HTML (hast)
757+
758+
* **remark plugins** process markdown (mdast)
759+
* **rehype plugins** process HTML (hast)
754760

755761
## Appendix B: Components
756762

0 commit comments

Comments
 (0)