Skip to content

Commit

Permalink
docs: update import path for langs and themes (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
litingyes authored Sep 14, 2024
1 parent 89f1349 commit f8a3f1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/guide/sync-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ In some extreme cases that you need to run Shiki completely synchronously, since

```ts
import { createHighlighterCoreSync, createJavaScriptRegexEngine } from 'shiki/core'
import js from 'shiki/core/langs/javascript.mjs'
import nord from 'shiki/core/themes/nord.mjs'
import js from 'shiki/langs/javascript.mjs'
import nord from 'shiki/themes/nord.mjs'

const shiki = createHighlighterCoreSync({
themes: [nord],
Expand All @@ -24,8 +24,8 @@ The [Oniguruma Engine](/guide/regex-engines#oniguruma-engine) can only be create

```ts
import { createHighlighterCoreSync, createWasmOnigEngine } from 'shiki/core'
import js from 'shiki/core/langs/javascript.mjs'
import nord from 'shiki/core/themes/nord.mjs'
import js from 'shiki/langs/javascript.mjs'
import nord from 'shiki/themes/nord.mjs'

// Load this somewhere beforehand
const engine = await createWasmOnigEngine(import('shiki/wasm'))
Expand Down

0 comments on commit f8a3f1f

Please sign in to comment.