diff options
| author | marihachi <marihachi0620@gmail.com> | 2021-11-01 23:47:13 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-01 23:47:13 +0900 |
| commit | 1c38c7010d9a9604df979faa867cd8f9e7d825c9 (patch) | |
| tree | d4083b7255f69eaaf0eb5cedcf3591a344fd0762 /src/remote/activitypub/misc/get-note-html.ts | |
| parent | add some locales (diff) | |
| download | misskey-1c38c7010d9a9604df979faa867cd8f9e7d825c9.tar.gz misskey-1c38c7010d9a9604df979faa867cd8f9e7d825c9.tar.bz2 misskey-1c38c7010d9a9604df979faa867cd8f9e7d825c9.zip | |
refactor: Introduce list of MFM Functions (#7882)
* introduce list of MFM Functions
* add note
Diffstat (limited to 'src/remote/activitypub/misc/get-note-html.ts')
| -rw-r--r-- | src/remote/activitypub/misc/get-note-html.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/remote/activitypub/misc/get-note-html.ts b/src/remote/activitypub/misc/get-note-html.ts index 043335a5be..a24ec43a69 100644 --- a/src/remote/activitypub/misc/get-note-html.ts +++ b/src/remote/activitypub/misc/get-note-html.ts @@ -1,9 +1,10 @@ import * as mfm from 'mfm-js'; +import { fnNameList } from '@/mfm/fn-name-list'; import { Note } from '@/models/entities/note'; import { toHtml } from '../../../mfm/to-html'; export default function(note: Note) { - let html = note.text ? toHtml(mfm.parse(note.text), JSON.parse(note.mentionedRemoteUsers)) : null; + let html = note.text ? toHtml(mfm.parse(note.text, { fnNameList }), JSON.parse(note.mentionedRemoteUsers)) : null; if (html == null) html = '<p>.</p>'; return html; |