forked from mirror/misskey
remove katex
This commit is contained in:
parent
90e2186872
commit
e51432a461
@ -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にアップデートされました
|
||||
|
@ -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",
|
||||
|
@ -1,24 +0,0 @@
|
||||
<template>
|
||||
<XFormula :formula="formula" :block="block"/>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
XFormula: defineAsyncComponent(() => import('@/components/MkFormulaCore.vue')),
|
||||
},
|
||||
props: {
|
||||
formula: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
block: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
@ -1,34 +0,0 @@
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<template>
|
||||
<div v-if="block" v-html="compiledFormula"></div>
|
||||
<span v-else v-html="compiledFormula"></span>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import katex from 'katex';
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
formula: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
block: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
compiledFormula(): any {
|
||||
return katex.renderToString(this.formula, {
|
||||
throwOnError: false,
|
||||
} as any);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import "../../node_modules/katex/dist/katex.min.css";
|
||||
</style>
|
@ -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': {
|
||||
|
@ -114,16 +114,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="title">{{ i18n.ts._mfm.inlineMath }}</div>
|
||||
<div class="content">
|
||||
<p>{{ i18n.ts._mfm.inlineMathDescription }}</p>
|
||||
<div class="preview">
|
||||
<Mfm :text="preview_inlineMath"/>
|
||||
<MkTextarea v-model="preview_inlineMath"><template #label>MFM</template></MkTextarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- deprecated
|
||||
<div class="section">
|
||||
<div class="title">{{ i18n.ts._mfm.search }}</div>
|
||||
@ -329,7 +319,6 @@ let preview_small = $ref(`<small>${i18n.ts._mfm.dummy}</small>`);
|
||||
let preview_center = $ref(`<center>${i18n.ts._mfm.dummy}</center>`);
|
||||
let preview_inlineCode = $ref('`<: "Hello, world!"`');
|
||||
let preview_blockCode = $ref('```\n~ (#i, 100) {\n\t<: ? ((i % 15) = 0) "FizzBuzz"\n\t\t.? ((i % 3) = 0) "Fizz"\n\t\t.? ((i % 5) = 0) "Buzz"\n\t\t. i\n}\n```');
|
||||
let preview_inlineMath = $ref('\\(x= \\frac{-b\' \\pm \\sqrt{(b\')^2-ac}}{a}\\)');
|
||||
let preview_quote = $ref(`> ${i18n.ts._mfm.dummy}`);
|
||||
let preview_search = $ref(`${i18n.ts._mfm.dummy} 検索`);
|
||||
let preview_jelly = $ref('$[jelly 🍮] $[jelly.speed=5s 🍮]');
|
||||
|
27
yarn.lock
27
yarn.lock
@ -2445,13 +2445,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/katex@npm:0.16.0":
|
||||
version: 0.16.0
|
||||
resolution: "@types/katex@npm:0.16.0"
|
||||
checksum: f93ceb2496621d18a28252264c0b7f5b0bdf125f9dc92d1adfbd9bf00942cd2918de336fae628d3929e615aaf84b7adb1781711c4e4605664be0827b1013ec14
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/keyv@npm:^3.1.4":
|
||||
version: 3.1.4
|
||||
resolution: "@types/keyv@npm:3.1.4"
|
||||
@ -5436,13 +5429,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"commander@npm:^8.0.0":
|
||||
version: 8.3.0
|
||||
resolution: "commander@npm:8.3.0"
|
||||
checksum: 0f82321821fc27b83bd409510bb9deeebcfa799ff0bf5d102128b500b7af22872c0c92cb6a0ebc5a4cf19c6b550fba9cedfa7329d18c6442a625f851377bacf0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"commander@npm:^9.0.0":
|
||||
version: 9.4.1
|
||||
resolution: "commander@npm:9.4.1"
|
||||
@ -8049,7 +8035,6 @@ __metadata:
|
||||
"@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
|
||||
@ -8090,7 +8075,6 @@ __metadata:
|
||||
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
|
||||
@ -10921,17 +10905,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"katex@npm:0.16.4":
|
||||
version: 0.16.4
|
||||
resolution: "katex@npm:0.16.4"
|
||||
dependencies:
|
||||
commander: ^8.0.0
|
||||
bin:
|
||||
katex: cli.js
|
||||
checksum: 94eaf1fbd8365792308527695c09baa6d2d84e2d0170e4af44fb12be3ed403fb3430caff2410117f2f1a9dfdb329f61ab9611d97e645d9c89ee60940698a45cc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"keygrip@npm:~1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "keygrip@npm:1.1.0"
|
||||
|
Loading…
Reference in New Issue
Block a user