Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/screens/Chat/SimpleTextMessage/index.tsx
Original file line number Diff line number Diff line change
@@ -29,7 +29,11 @@ const marked = new Marked(
if (lang === undefined || lang === '') {
return hljs.highlightAuto(code).value
}
return hljs.highlight(code, { language: lang }).value
try {
return hljs.highlight(code, { language: lang }).value
} catch (err) {
return hljs.highlight(code, { language: 'javascript' }).value
}
},
}),
{

0 comments on commit 848bdbc

Please sign in to comment.