Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jun 21, 2024
1 parent 77b1f65 commit 850a2a7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export * from './utils'
export * from './types'

export { loadWasm } from './oniguruma'
export { createShikiInternal, setDefaultWasmLoader } from './internal'
export { createShikiInternal, getShikiInternal, setDefaultWasmLoader } from './internal'
export { codeToTokensBase, tokenizeWithTheme } from './code-to-tokens-base'
export { codeToTokens } from './code-to-tokens'
export { tokenizeAnsiWithTheme } from './code-to-tokens-ansi'
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ export async function createShikiInternal(options: HighlighterCoreOptions = {}):
}
}

/**
* @deprecated Use `createShikiInternal` instead.
*/
export function getShikiInternal(options: HighlighterCoreOptions = {}): Promise<ShikiInternal> {
// TODO: next: console.warn('`getShikiInternal` is deprecated. Use `createShikiInternal` instead.')
return createShikiInternal(options)
Expand Down
2 changes: 1 addition & 1 deletion packages/shiki/test/core.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ describe('errors', () => {
})

it('throw on using disposed instance', async () => {
const shiki = await getHighlighterCore({
const shiki = await createHighlighterCore({
themes: [nord],
langs: [js as any],
})
Expand Down
2 changes: 1 addition & 1 deletion 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.

0 comments on commit 850a2a7

Please sign in to comment.