Skip to content

Commit e7ef7ee

Browse files
committed
Add svg support
1 parent 478ca41 commit e7ef7ee

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/components/common/MarkdownRender.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ function filter(html: string) {
158158
'span',
159159
'img',
160160
'del',
161+
161162
...katexWhitelist.tags,
162163
],
163164
allowedAttributes: {

src/lib/katexWhitelist.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ const tags = [
2626
'mpadded',
2727
'mphantom',
2828
'mglyph',
29+
'svg',
30+
'path',
31+
'line',
2932
];
3033

3134
const attributes = tags.reduce((acc, current) => {

0 commit comments

Comments
 (0)