summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkCode.core.vue
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2024-03-24 11:53:52 +0000
committerdakkar <dakkar@thenautilus.net>2024-03-24 11:53:52 +0000
commitbc531ac414deab044d18ce41da1863138b2906a5 (patch)
tree500d323a47044216c4505695d4732d7dad3b08b2 /packages/frontend/src/components/MkCode.core.vue
parentMerge branch 'develop' into future-2024-03-23 (diff)
parenttest(backend): fix streaming test error when replying to followers-only note ... (diff)
downloadsharkey-bc531ac414deab044d18ce41da1863138b2906a5.tar.gz
sharkey-bc531ac414deab044d18ce41da1863138b2906a5.tar.bz2
sharkey-bc531ac414deab044d18ce41da1863138b2906a5.zip
Merge remote-tracking branch 'misskey/develop' into future-2024-03-23
Diffstat (limited to 'packages/frontend/src/components/MkCode.core.vue')
-rw-r--r--packages/frontend/src/components/MkCode.core.vue10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/frontend/src/components/MkCode.core.vue b/packages/frontend/src/components/MkCode.core.vue
index a23b4dc3b2..9e54420034 100644
--- a/packages/frontend/src/components/MkCode.core.vue
+++ b/packages/frontend/src/components/MkCode.core.vue
@@ -9,9 +9,9 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
-import { ref, computed, watch } from 'vue';
-import { bundledLanguagesInfo } from 'shiki';
-import type { BuiltinLanguage } from 'shiki';
+import { computed, ref, watch } from 'vue';
+import { bundledLanguagesInfo } from 'shiki/langs';
+import type { BundledLanguage } from 'shiki/langs';
import { getHighlighter, getTheme } from '@/scripts/code-highlighter.js';
import { defaultStore } from '@/store.js';
@@ -23,7 +23,7 @@ const props = defineProps<{
const highlighter = await getHighlighter();
const darkMode = defaultStore.reactiveState.darkMode;
-const codeLang = ref<BuiltinLanguage | 'aiscript'>('js');
+const codeLang = ref<BundledLanguage | 'aiscript'>('js');
const [lightThemeName, darkThemeName] = await Promise.all([
getTheme('light', true),
@@ -42,7 +42,7 @@ const html = computed(() => highlighter.codeToHtml(props.code, {
}));
async function fetchLanguage(to: string): Promise<void> {
- const language = to as BuiltinLanguage;
+ const language = to as BundledLanguage;
// Check for the loaded languages, and load the language if it's not loaded yet.
if (!highlighter.getLoadedLanguages().includes(language)) {