From f81f58b084fcccd9d5d0a5b2e429fbe3edadec3f Mon Sep 17 00:00:00 2001 From: "Azat S." Date: Fri, 6 Sep 2024 00:08:46 +0700 Subject: [PATCH] refactor: move shiki to create highlighter method --- docs/stores/shiki.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/stores/shiki.ts b/docs/stores/shiki.ts index 76fe9532..592499e3 100644 --- a/docs/stores/shiki.ts +++ b/docs/stores/shiki.ts @@ -1,6 +1,6 @@ import type { HighlighterCore } from 'shiki' -import { createJavaScriptRegexEngine, getSingletonHighlighter } from 'shiki' +import { createJavaScriptRegexEngine, createHighlighter } from 'shiki' import { computed, onMount, atom, task } from 'nanostores' import { colorTheme } from '../utils/shiki-theme' @@ -16,7 +16,7 @@ export let shiki = computed([shikiHighlighter], highlighter => ({ onMount(shikiHighlighter, () => { task(async () => { - let highlighter = await getSingletonHighlighter({ + let highlighter = await createHighlighter({ langs: [ import('shiki/langs/svelte.mjs'), import('shiki/langs/astro.mjs'),