yumechi-no-kuni/src/remote/activitypub/misc/get-note-html.ts

11 lines
286 B
TypeScript
Raw Normal View History

2018-06-18 00:28:43 -05:00
import { INote } from '../../../models/note';
import toHtml from '../../../mfm/html';
import parse from '../../../mfm/parse';
2018-04-21 20:44:17 -05:00
export default function(note: INote) {
2018-06-17 01:58:23 -05:00
let html = toHtml(parse(note.text), note.mentionedRemoteUsers);
2018-11-04 01:17:52 -05:00
if (html == null) html = '<p>.</p>';
2018-04-21 20:44:17 -05:00
return html;
}