@@ -145,6 +145,7 @@ relevant links: [markdown](https://commonmark.org), [remark](https://github.com/
145
145
import React , { Fragment } from ' react' ;
146
146
import { useRemark } from ' @christianmurphy/react-remark' ;
147
147
import remarkGemoji from ' remark-gemoji' ;
148
+ import rehypeSlug from ' rehype-slug' ;
148
149
import rehypeAutoLinkHeadings from ' rehype-autolink-headings' ;
149
150
150
151
// ...
@@ -153,7 +154,7 @@ const [reactContent, setMarkdownSource] = useRemark({
153
154
remarkParseOptions: { commonmark: true },
154
155
remarkPlugins: [remarkGemoji ],
155
156
remarkToRehypeOptions: { commonmark: true },
156
- rehypePlugins: [rehypeAutoLinkHeadings ],
157
+ rehypePlugins: [rehypeSlug , rehypeAutoLinkHeadings ],
157
158
rehypeReactOptions: {
158
159
components: {
159
160
p : props => <p className = " custom-paragraph" { ... props } />,
@@ -168,6 +169,7 @@ const [reactContent, setMarkdownSource] = useRemark({
168
169
import React , { Fragment } from ' react' ;
169
170
import { useRemark } from ' @christianmurphy/react-remark' ;
170
171
import remarkGemoji from ' remark-gemoji' ;
172
+ import rehypeSlug from ' rehype-slug' ;
171
173
import rehypeAutoLinkHeadings from ' rehype-autolink-headings' ;
172
174
173
175
// ...
@@ -176,7 +178,7 @@ import rehypeAutoLinkHeadings from 'rehype-autolink-headings';
176
178
remarkParseOptions = { { commonmark: true }}
177
179
remarkPlugins = { [remarkGemoji ]}
178
180
remarkToRehypeOptions = { { commonmark: true }}
179
- rehypePlugins = { [rehypeAutoLinkHeadings ]}
181
+ rehypePlugins = { [rehypeSlug , rehypeAutoLinkHeadings ]}
180
182
rehypeReactOptions = { {
181
183
components: {
182
184
p : props => <p className = " custom-paragraph" { ... props } />,
0 commit comments