Skip to content

Commit cfe2ddf

Browse files
authored
docs: fix markdown-it and rehype examples (#956)
1 parent ab672eb commit cfe2ddf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/packages/markdown-it.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ By default, the full bundle of `shiki` will be imported. If you are using a [fin
5151
import { fromHighlighter } from '@shikijs/markdown-it/core'
5252
import MarkdownIt from 'markdown-it'
5353
import { createHighlighterCore } from 'shiki/core'
54+
import { createOnigurumaEngine } from 'shiki/engine/oniguruma'
5455

5556
const highlighter = await createHighlighterCore({
5657
themes: [
@@ -59,7 +60,7 @@ const highlighter = await createHighlighterCore({
5960
langs: [
6061
import('@shikijs/langs/javascript'),
6162
],
62-
loadWasm: import('shiki/wasm')
63+
engine: createOnigurumaEngine(() => import('shiki/wasm'))
6364
})
6465

6566
const md = MarkdownIt()

docs/packages/rehype.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import rehypeStringify from 'rehype-stringify'
6767
import remarkParse from 'remark-parse'
6868
import remarkRehype from 'remark-rehype'
6969
import { createHighlighterCore } from 'shiki/core'
70+
import { createOnigurumaEngine } from 'shiki/engine/oniguruma'
7071

7172
import { unified } from 'unified'
7273

@@ -77,7 +78,7 @@ const highlighter = await createHighlighterCore({
7778
langs: [
7879
import('@shikijs/langs/javascript'),
7980
],
80-
loadWasm: import('shiki/wasm')
81+
engine: createOnigurumaEngine(() => import('shiki/wasm'))
8182
})
8283

8384
const raw = await fs.readFile('./input.md')

0 commit comments

Comments
 (0)