mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 20:07:33 -07:00
50a45ce1a1
* Add angle bracket covered url syntax to mfm * Fix path * Fix match * Fix index
9 lines
424 B
TypeScript
9 lines
424 B
TypeScript
import { EmojiNode, MfmForest } from '../mfm/prelude';
|
|
import { preorderF } from '../prelude/tree';
|
|
import { unique } from '../prelude/array';
|
|
|
|
export default function(mfmForest: MfmForest): string[] {
|
|
const emojiNodes = preorderF(mfmForest).filter(x => x.type === 'emoji') as EmojiNode[];
|
|
const emojis = emojiNodes.filter(x => x.props.name && x.props.name.length <= 100).map(x => x.props.name);
|
|
return unique(emojis);
|
|
}
|