Skip to content

Commit ea197c5

Browse files
committed
Filter on SSR
1 parent 8dcce02 commit ea197c5

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/components/common/MarkdownRender.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,18 @@ const MarkdownRender: React.FC<MarkdownRenderProps> = ({
156156
}) => {
157157
const [html, setHtml] = useState(
158158
ssrEnabled
159-
? remark()
160-
.use(breaks)
161-
.use(prismPlugin)
162-
.use(htmlPlugin, {
163-
sanitize: true,
164-
})
165-
.use(embedPlugin)
166-
.use(slug)
167-
.processSync(markdown)
168-
.toString()
159+
? filter(
160+
remark()
161+
.use(breaks)
162+
.use(prismPlugin)
163+
.use(htmlPlugin, {
164+
sanitize: true,
165+
})
166+
.use(embedPlugin)
167+
.use(slug)
168+
.processSync(markdown)
169+
.toString(),
170+
)
169171
: '',
170172
);
171173

0 commit comments

Comments
 (0)