File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff 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
751756This 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
You can’t perform that action at this time.
0 commit comments