refactor(frontend): 非推奨の表現を改める (#14517)

This commit is contained in:
かっこかり
2024-09-15 12:31:17 +09:00
committed by GitHub
parent be0906a6c7
commit 1544ba9153
3 changed files with 33 additions and 34 deletions

View File

@@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { getHighlighterCore, loadWasm } from 'shiki/core';
import { createHighlighterCore, loadWasm } from 'shiki/core';
import darkPlus from 'shiki/themes/dark-plus.mjs';
import { bundledThemesInfo } from 'shiki/themes';
import { bundledLanguagesInfo } from 'shiki/langs';
@@ -69,7 +69,7 @@ async function initHighlighter() {
]);
const jsLangInfo = bundledLanguagesInfo.find(t => t.id === 'javascript');
const highlighter = await getHighlighterCore({
const highlighter = await createHighlighterCore({
themes,
langs: [
...(jsLangInfo ? [async () => await jsLangInfo.import()] : []),