Skip to content

Commit

Permalink
chore: remove ugly workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
CNSeniorious000 committed Oct 1, 2024
1 parent 2fce175 commit d54381f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,14 @@
"remark-breaks": "^4.0.0",
"remark-gfm": "^4.0.0",
"remark-math": "^6.0.0",
"remark-parse": "^11.0.0",
"reveal.js": "^5.1.0",
"solid-js": "^1.9.1",
"solid-markdown": "^2.0.13",
"solid-toast": "^0.5.0",
"solidjs-use": "^2.3.0",
"svelte": "^4.2.19",
"svelte-sonner": "^0.3.28",
"tiktoken": "^1.0.16",
"unified": "^11.0.5"
"tiktoken": "^1.0.16"
},
"devDependencies": {
"@evan-yang/eslint-config": "^1.0.9",
Expand All @@ -59,5 +57,10 @@
"svelte-ripple-action": "^1.0.6",
"unocss": "^0.63.1",
"unocss-preset-scrollbar": "^0.3.1"
},
"overrides": {
"remark-gfm": "^4.0.0",
"remark-parse": "^11.0.0",
"unified": "^11.0.5"
}
}
6 changes: 0 additions & 6 deletions pnpm-lock.yaml

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

4 changes: 0 additions & 4 deletions src/components/MessageItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import rehypeKatex from 'rehype-katex'
import rehypeHighlight from 'rehype-highlight'
import { SolidMarkdown } from 'solid-markdown'
import remarkBreaks from 'remark-breaks'
import { unified } from 'unified'
import remarkParse from 'remark-parse'
import IconRefresh from './icons/Refresh'
import CodeBlock from './CodeBlock'
import type { Accessor } from 'solid-js'
Expand Down Expand Up @@ -36,8 +34,6 @@ export default ({ role, message, showRetry, onRetry }: Props) => {
: markdown
}

unified().use(remarkParse) // a weird workaround to fix a strange bug in solid-markdown that "setting on undefined" error

return (
<div class="px-20 transition-colors -mx-20 hover:bg-$c-fg-2 2xl:(px-20 -mx-20) md:(px-5 transition-background-color -mx-5)">
<div class="py-0.5 transition-padding 2xl:py-2 md:py-1">
Expand Down

0 comments on commit d54381f

Please sign in to comment.