diff --git a/src/lib/syntax.ts b/src/lib/syntax.ts index a13a4e281..d0a53a453 100644 --- a/src/lib/syntax.ts +++ b/src/lib/syntax.ts @@ -11,7 +11,7 @@ import sourceToml from "@wooorm/starry-night/lang/source.toml"; import sourceTsx from "@wooorm/starry-night/lang/source.tsx"; import { createStarryNight, common } from "@wooorm/starry-night"; -export type MaybeHighlighted = Root | undefined; +export { type Root }; export const grammars = [ ...common, @@ -36,7 +36,7 @@ let starryNight: Awaited>; export async function highlight( content: string, grammar: string, -): Promise { +): Promise { if (starryNight === undefined) { starryNight = await createStarryNight(grammars, { getOnigurumaUrlFetch: () => new URL(onigurumaWASMUrl, import.meta.url), diff --git a/src/views/projects/Blob.svelte b/src/views/projects/Blob.svelte index 064f13521..2ef4c956b 100644 --- a/src/views/projects/Blob.svelte +++ b/src/views/projects/Blob.svelte @@ -1,11 +1,10 @@