|
1 | 1 | <script lang="ts">
|
2 |
| - import Markdown from "svelte-exmarkdown" |
3 |
| - import type { Plugin } from "svelte-exmarkdown" |
4 | 2 | import rehypeShikiFromHighlighter from "@shikijs/rehype/core"
|
| 3 | + import rehypeClassNames from "rehype-class-names" |
| 4 | + import rehypeKatex from "rehype-katex" |
| 5 | + import remarkMath from "remark-math" |
5 | 6 | import { createHighlighterCoreSync } from "shiki/core"
|
6 | 7 | import { createJavaScriptRegexEngine } from "shiki/engine/javascript"
|
7 |
| - import ts from "shiki/langs/typescript.mjs" |
| 8 | + import html from "shiki/langs/html.mjs" |
| 9 | + import json from "shiki/langs/json.mjs" |
| 10 | + import rust from "shiki/langs/rust.mjs" |
8 | 11 | import svelte from "shiki/langs/svelte.mjs"
|
| 12 | + import ts from "shiki/langs/typescript.mjs" |
9 | 13 | import vitesseDark from "shiki/themes/vitesse-dark.mjs"
|
10 |
| - import rehypeKatex from "rehype-katex" |
11 |
| - import remarkMath from "remark-math" |
12 |
| - import rehypeClassNames from "rehype-class-names" |
| 14 | + import Markdown from "svelte-exmarkdown" |
| 15 | + import type { Plugin } from "svelte-exmarkdown" |
13 | 16 | import Pre from "./Pre.svelte"
|
14 | 17 |
|
15 | 18 | const addClass: Plugin = {
|
|
26 | 29 | rehypeShikiFromHighlighter,
|
27 | 30 | createHighlighterCoreSync({
|
28 | 31 | themes: [vitesseDark],
|
29 |
| - langs: [ts, svelte], |
| 32 | + langs: [ts, svelte, json, html, rust], |
30 | 33 | engine: createJavaScriptRegexEngine()
|
31 | 34 | }),
|
32 | 35 | {
|
|
0 commit comments