summaryrefslogtreecommitdiff
path: root/packages/frontend
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2025-05-22 22:57:04 +0900
committerGitHub <noreply@github.com>2025-05-22 22:57:04 +0900
commitaaee0a788da35dddb5012d150c815e34210ba1ca (patch)
tree6901e969743ef0f52ad7ea437455f0b1c1680469 /packages/frontend
parentfeat(frontend): tabler-iconsのサブセット化 (#15340) (diff)
downloadmisskey-aaee0a788da35dddb5012d150c815e34210ba1ca.tar.gz
misskey-aaee0a788da35dddb5012d150c815e34210ba1ca.tar.bz2
misskey-aaee0a788da35dddb5012d150c815e34210ba1ca.zip
enhance(frontend): シンタックスハイライトのエンジンをJavaScriptベースのものに変更 (#16084)
* refactor(frontend): シンタックスハイライトのエンジンをJavaScriptベースのものに変更 * Update Changelog
Diffstat (limited to 'packages/frontend')
-rw-r--r--packages/frontend/src/utility/code-highlighter.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/frontend/src/utility/code-highlighter.ts b/packages/frontend/src/utility/code-highlighter.ts
index 4f2aff9d4c..7dca18d58f 100644
--- a/packages/frontend/src/utility/code-highlighter.ts
+++ b/packages/frontend/src/utility/code-highlighter.ts
@@ -4,7 +4,7 @@
*/
import { createHighlighterCore } from 'shiki/core';
-import { createOnigurumaEngine } from 'shiki/engine/oniguruma';
+import { createJavaScriptRegexEngine } from 'shiki/engine/javascript';
import darkPlus from 'shiki/themes/dark-plus.mjs';
import { bundledThemesInfo } from 'shiki/themes';
import { bundledLanguagesInfo } from 'shiki/langs';
@@ -71,7 +71,7 @@ async function initHighlighter() {
const jsLangInfo = bundledLanguagesInfo.find(t => t.id === 'javascript');
const highlighter = await createHighlighterCore({
- engine: createOnigurumaEngine(() => import('shiki/onig.wasm?init')),
+ engine: createJavaScriptRegexEngine({ forgiving: true }),
themes,
langs: [
...(jsLangInfo ? [async () => await jsLangInfo.import()] : []),