From e51432a461ee4f36b7bcd553108098bdd344cc93 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 11 Jan 2023 08:58:13 +0900 Subject: [PATCH] remove katex --- CHANGELOG.md | 1 + packages/frontend/package.json | 2 -- .../frontend/src/components/MkFormula.vue | 24 ------------- .../frontend/src/components/MkFormulaCore.vue | 34 ------------------- packages/frontend/src/components/mfm.ts | 15 ++------ .../frontend/src/pages/mfm-cheat-sheet.vue | 11 ------ yarn.lock | 27 --------------- 7 files changed, 4 insertions(+), 110 deletions(-) delete mode 100644 packages/frontend/src/components/MkFormula.vue delete mode 100644 packages/frontend/src/components/MkFormulaCore.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 63da0a5fe..2bc6c42e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ You should also include the user name that made the change. #### For users - ノートのウォッチ機能が削除されました - アンケートに投票された際に通知が作成されなくなりました +- ノートの数式埋め込みが削除されました - 新たに動的なPagesを作ることはできなくなりました - 代わりにAiScriptを用いてより柔軟に動的なコンテンツを作成できるMisskey Play機能が実装されています。 - AiScriptが0.12.2にアップデートされました diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 72a9532c6..0c33ada76 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -36,7 +36,6 @@ "insert-text-at-cursor": "0.3.0", "is-file-animated": "1.0.2", "json5": "2.2.3", - "katex": "0.16.4", "matter-js": "0.18.0", "mfm-js": "0.23.1", "misskey-js": "0.0.14", @@ -73,7 +72,6 @@ "@types/glob": "8.0.0", "@types/gulp": "4.0.10", "@types/gulp-rename": "2.0.1", - "@types/katex": "0.16.0", "@types/matter-js": "0.18.2", "@types/punycode": "2.1.0", "@types/sanitize-html": "^2.8.0", diff --git a/packages/frontend/src/components/MkFormula.vue b/packages/frontend/src/components/MkFormula.vue deleted file mode 100644 index 65a2fee93..000000000 --- a/packages/frontend/src/components/MkFormula.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/packages/frontend/src/components/MkFormulaCore.vue b/packages/frontend/src/components/MkFormulaCore.vue deleted file mode 100644 index 6028db9e6..000000000 --- a/packages/frontend/src/components/MkFormulaCore.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - diff --git a/packages/frontend/src/components/mfm.ts b/packages/frontend/src/components/mfm.ts index d248ec9f4..49d08b348 100644 --- a/packages/frontend/src/components/mfm.ts +++ b/packages/frontend/src/components/mfm.ts @@ -5,7 +5,6 @@ import MkLink from '@/components/MkLink.vue'; import MkMention from '@/components/MkMention.vue'; import MkEmoji from '@/components/global/MkEmoji.vue'; import { concat } from '@/scripts/array'; -import MkFormula from '@/components/MkFormula.vue'; import MkCode from '@/components/MkCode.vue'; import MkGoogle from '@/components/MkGoogle.vue'; import MkSparkle from '@/components/MkSparkle.vue'; @@ -273,7 +272,7 @@ export default defineComponent({ key: Math.random(), emoji: `:${token.props.name}:`, normal: this.plain, - host: this.author?.host, + host: this.author.host, })]; } @@ -286,19 +285,11 @@ export default defineComponent({ } case 'mathInline': { - return [h(MkFormula, { - key: Math.random(), - formula: token.props.formula, - block: false, - })]; + return [h('code', genEl(token.props.formula))]; } case 'mathBlock': { - return [h(MkFormula, { - key: Math.random(), - formula: token.props.formula, - block: true, - })]; + return [h('code', genEl(token.props.formula))]; } case 'search': { diff --git a/packages/frontend/src/pages/mfm-cheat-sheet.vue b/packages/frontend/src/pages/mfm-cheat-sheet.vue index 4dde3f266..b3932ff7c 100644 --- a/packages/frontend/src/pages/mfm-cheat-sheet.vue +++ b/packages/frontend/src/pages/mfm-cheat-sheet.vue @@ -114,16 +114,6 @@ -
-
{{ i18n.ts._mfm.inlineMath }}
-
-

{{ i18n.ts._mfm.inlineMathDescription }}

-
- - -
-
-