Skip to content

Commit

Permalink
Update marked from v4 to v12 (#1015)
Browse files Browse the repository at this point in the history
feat: update marked from v4 to v12
  • Loading branch information
Saghen authored Apr 16, 2024
1 parent f12455d commit 305971b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 32 deletions.
43 changes: 17 additions & 26 deletions package-lock.json

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

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@sveltejs/kit": "^1.30.4",
"@tailwindcss/typography": "^0.5.9",
"@types/jsdom": "^21.1.1",
"@types/marked": "^4.0.8",
"@types/minimist": "^1.2.5",
"@types/parquetjs": "^0.10.3",
"@types/uuid": "^9.0.8",
Expand All @@ -33,7 +32,6 @@
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.30.0",
"marked-katex-extension": "^3.0.6",
"minimist": "^1.2.8",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.10.1",
Expand Down Expand Up @@ -65,7 +63,8 @@
"ip-address": "^9.0.5",
"jsdom": "^22.0.0",
"json5": "^2.2.3",
"marked": "^4.3.0",
"marked": "^12.0.1",
"marked-katex-extension": "^5.0.1",
"mongodb": "^5.8.0",
"nanoid": "^4.0.2",
"openid-client": "^5.4.2",
Expand Down
6 changes: 3 additions & 3 deletions src/lib/components/chat/ChatMessage.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { marked } from "marked";
import { marked, type MarkedOptions } from "marked";
import markedKatex from "marked-katex-extension";
import type { Message } from "$lib/types/Message";
import { afterUpdate, createEventDispatcher, tick } from "svelte";
Expand Down Expand Up @@ -82,11 +82,11 @@
};
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { extensions, ...defaults } = marked.getDefaults() as marked.MarkedOptions & {
const { extensions, ...defaults } = marked.getDefaults() as MarkedOptions & {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
extensions: any;
};
const options: marked.MarkedOptions = {
const options: MarkedOptions = {
...defaults,
gfm: true,
breaks: true,
Expand Down

0 comments on commit 305971b

Please sign in to comment.