Skip to content

Commit

Permalink
chore: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 20, 2025
1 parent 1212f47 commit 2c3dab6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
6 changes: 5 additions & 1 deletion docs/packages/twoslash.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ Number.parseInt('123', 10)

```ts twoslash
import { createHighlighterCore } from 'shiki/core'
import { createJavaScriptRegexEngine } from 'shiki/engine/javascript'

const highlighter = await createHighlighterCore({
engine: createJavaScriptRegexEngine()
})

const highlighter = await createHighlighterCore({})
// @log: Custom log message
const a = 1
// @error: Custom error message
Expand Down
20 changes: 17 additions & 3 deletions packages/twoslash/test/out/rich/custom-tags.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion packages/twoslash/test/rich.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,12 @@ obj.boo
it('custom-tags', async () => {
const code = `
import { createHighlighterCore } from 'shiki/core'
import { createJavaScriptRegexEngine } from 'shiki/engine/javascript'
const shiki = await createHighlighterCore({
engine: createJavaScriptRegexEngine(),
})
const shiki = await createHighlighterCore({})
// @log: Custom log message
const a = 1
// @error: Custom error message
Expand Down

0 comments on commit 2c3dab6

Please sign in to comment.