fix(frontend): aiscriptのコードブロックでのハイライト指定を修正 (#13208)
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
"@twemoji/parser": "15.0.0",
|
||||
"@vitejs/plugin-vue": "5.0.3",
|
||||
"@vue/compiler-sfc": "3.4.15",
|
||||
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.0.6",
|
||||
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.2",
|
||||
"astring": "1.8.6",
|
||||
"broadcast-channel": "7.0.0",
|
||||
"buraha": "0.0.1",
|
||||
|
@@ -20,7 +20,7 @@ export async function getTheme(mode: 'light' | 'dark', getName = false): Promise
|
||||
const base = [lightTheme, darkTheme].find(x => x.id === theme.base);
|
||||
if (base && base.codeHighlighter) theme.codeHighlighter = Object.assign({}, base.codeHighlighter, theme.codeHighlighter);
|
||||
}
|
||||
|
||||
|
||||
if (theme.codeHighlighter) {
|
||||
let _res: ThemeRegistration = {};
|
||||
if (theme.codeHighlighter.base === '_none_') {
|
||||
@@ -55,7 +55,7 @@ export async function getHighlighter(): Promise<Highlighter> {
|
||||
|
||||
export async function initHighlighter() {
|
||||
const aiScriptGrammar = await import('aiscript-vscode/aiscript/syntaxes/aiscript.tmLanguage.json');
|
||||
|
||||
|
||||
await loadWasm(import('shiki/onig.wasm?init'));
|
||||
|
||||
// テーマの重複を消す
|
||||
@@ -68,10 +68,7 @@ export async function initHighlighter() {
|
||||
themes,
|
||||
langs: [
|
||||
import('shiki/langs/javascript.mjs'),
|
||||
{
|
||||
aliases: ['is', 'ais'],
|
||||
...aiScriptGrammar.default,
|
||||
} as unknown as LanguageRegistration,
|
||||
aiScriptGrammar.default as unknown as LanguageRegistration,
|
||||
],
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user