refactor: Introduce list of MFM Functions (#7882)

* introduce list of MFM Functions

* add note
This commit is contained in:
marihachi
2021-11-01 23:47:13 +09:00
committed by GitHub
parent 34ea3cf226
commit 1c38c7010d
5 changed files with 33 additions and 6 deletions

View File

@@ -11,6 +11,7 @@ import MkGoogle from '@client/components/google.vue';
import MkSparkle from '@client/components/sparkle.vue';
import MkA from '@client/components/global/a.vue';
import { host } from '@client/config';
import { fnNameList } from '@/mfm/fn-name-list';
export default defineComponent({
props: {
@@ -46,7 +47,7 @@ export default defineComponent({
render() {
if (this.text == null || this.text == '') return;
const ast = (this.plain ? mfm.parsePlain : mfm.parse)(this.text);
const ast = (this.plain ? mfm.parsePlain : mfm.parse)(this.text, { fnNameList });
const validTime = (t: string | null | undefined) => {
if (t == null) return null;