Skip to content

Commit f7945fb

Browse files
[benchmark] Adopt the new API
1 parent 7fcda7f commit f7945fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ function getWorst (results) {
422422
function createTestFunction (Prism, mainLanguage, testFunction) {
423423
if (testFunction === 'tokenize') {
424424
return code => {
425-
const grammar = Prism.components.getLanguage(mainLanguage);
425+
const grammar = Prism.languageRegistry.getLanguage(mainLanguage)?.resolvedGrammar;
426426
Prism.tokenize(code, grammar);
427427
};
428428
}

0 commit comments

Comments
 (0)