File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import config from 'codecrafters-frontend/config/environment';
22import * as shiki from 'shiki' ;
33
44/**
5- * getHighlighter () is the most expensive step of Shiki. Instead of calling it on every page,
5+ * createHighlighter () is the most expensive step of Shiki. Instead of calling it on every page,
66 * cache it here as much as possible. Make sure that your highlighters can be cached, state-free.
77 * We make this async, so that multiple calls to parse markdown still share the same highlighter.
88 */
@@ -35,7 +35,7 @@ export default function getOrCreateCachedHighlighterPromise(
3535 } as unknown as shiki . Highlighter ) ;
3636 } ) ;
3737 } else {
38- highlighterPromise = shiki . getHighlighter ( options ) ;
38+ highlighterPromise = shiki . createHighlighter ( options ) ;
3939 }
4040
4141 highlighterCacheAsync . set ( cacheId , highlighterPromise ) ;
You can’t perform that action at this time.
0 commit comments