Skip to content

Commit

Permalink
perf: change katex package
Browse files Browse the repository at this point in the history
  • Loading branch information
Chanzhaoyu committed May 16, 2024
1 parent a410376 commit ab9dca4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"common:prepare": "husky install"
},
"dependencies": {
"@traptitech/markdown-it-katex": "^3.6.0",
"@vscode/markdown-it-katex": "^1.0.3",
"@vueuse/core": "^9.13.0",
"highlight.js": "^11.7.0",
"html-to-image": "^1.11.11",
Expand Down
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/views/chat/components/Message/Text.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { computed, onMounted, onUnmounted, onUpdated, ref } from 'vue'
import MarkdownIt from 'markdown-it'
import mdKatex from '@traptitech/markdown-it-katex'
import mdKatex from '@vscode/markdown-it-katex'
import mila from 'markdown-it-link-attributes'
import hljs from 'highlight.js'
import { useBasicLayout } from '@/hooks/useBasicLayout'
Expand Down Expand Up @@ -36,7 +36,7 @@ const mdi = new MarkdownIt({
})
mdi.use(mila, { attrs: { target: '_blank', rel: 'noopener' } })
mdi.use(mdKatex, { blockClass: 'katexmath-block rounded-md p-[10px]', errorColor: ' #cc0000' })
mdi.use(mdKatex)
const wrapClass = computed(() => {
return [
Expand Down

0 comments on commit ab9dca4

Please sign in to comment.