Skip to content

Commit

Permalink
feat: better latex
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiller1990 committed Jul 26, 2024
1 parent 60823d8 commit d69390b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pages/threads/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ function toHtml(msg: string) {
if (!md.value) {
throw new Error("Markdownit should be defined!");
}
const regex = /\$[^$]*\$/g;
msg = msg.replace(regex, (match) => `\`${match}\``);
return md.value.render(msg);
}
Expand Down

0 comments on commit d69390b

Please sign in to comment.