We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8956a5f commit 0a006c2Copy full SHA for 0a006c2
src/lib/markdownToHtml.ts
@@ -7,9 +7,14 @@ import rehypeStringify from "rehype-stringify";
7
export default async function markdownToHtml(markdown: string) {
8
const result = await remark()
9
.use(remarkGfm)
10
- .use(remarkRehype)
+ .use(remarkRehype, {
11
+ allowDangerousHtml: true,
12
+ allowedElements: false, // Allow html syntax in markdown
13
+ })
14
.use(rehypeHighlight)
- .use(rehypeStringify)
15
+ .use(rehypeStringify, {
16
+ allowDangerousHtml: true
17
18
.process(markdown);
19
20
return result.toString();
0 commit comments