@@ -2,28 +2,28 @@ import type { HighlighterCoreOptions, HighlighterGeneric } from '../types'
2
2
import { codeToHtml } from './renderer-html'
3
3
import { codeToTokensWithThemes } from './renderer-html-themes'
4
4
import { codeToThemedTokens } from './tokenizer'
5
- import { getShikiInternal } from './context '
5
+ import { getShikiInternal } from './internal '
6
6
import { codeToHast } from './renderer-hast'
7
7
8
8
export type HighlighterCore = HighlighterGeneric < never , never >
9
9
10
10
export async function getHighlighterCore ( options : HighlighterCoreOptions = { } ) : Promise < HighlighterCore > {
11
- const context = await getShikiInternal ( options )
11
+ const internal = await getShikiInternal ( options )
12
12
13
13
return {
14
- codeToThemedTokens : ( code , options ) => codeToThemedTokens ( context , code , options ) ,
15
- codeToTokensWithThemes : ( code , options ) => codeToTokensWithThemes ( context , code , options ) ,
16
- codeToHast : ( code , options ) => codeToHast ( context , code , options ) ,
17
- codeToHtml : ( code , options ) => codeToHtml ( context , code , options ) ,
14
+ codeToThemedTokens : ( code , options ) => codeToThemedTokens ( internal , code , options ) ,
15
+ codeToTokensWithThemes : ( code , options ) => codeToTokensWithThemes ( internal , code , options ) ,
16
+ codeToHast : ( code , options ) => codeToHast ( internal , code , options ) ,
17
+ codeToHtml : ( code , options ) => codeToHtml ( internal , code , options ) ,
18
18
19
- loadLanguage : context . loadLanguage ,
20
- loadTheme : context . loadTheme ,
19
+ loadLanguage : internal . loadLanguage ,
20
+ loadTheme : internal . loadTheme ,
21
21
22
- getTheme : context . getTheme ,
22
+ getTheme : internal . getTheme ,
23
23
24
- getLoadedThemes : context . getLoadedThemes ,
25
- getLoadedLanguages : context . getLoadedLanguages ,
24
+ getLoadedThemes : internal . getLoadedThemes ,
25
+ getLoadedLanguages : internal . getLoadedLanguages ,
26
26
27
- getInternalContext : ( ) => context ,
27
+ getInternalContext : ( ) => internal ,
28
28
}
29
29
}
0 commit comments