Skip to content

Commit

Permalink
refactor: move shiki to create highlighter method
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-io committed Sep 5, 2024
1 parent 171aef1 commit f81f58b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/stores/shiki.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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'),
Expand Down

0 comments on commit f81f58b

Please sign in to comment.