summaryrefslogtreecommitdiff
path: root/src/misc/extract-emojis.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-04-02 10:36:11 +0900
committerGitHub <noreply@github.com>2021-04-02 10:36:11 +0900
commit1f4ae2f63a609d51942daa23772439379496064e (patch)
tree55e67e216bd30b8a5c95f769e8696c4b885d1e61 /src/misc/extract-emojis.ts
parenttweak avatar generation (diff)
downloadmisskey-1f4ae2f63a609d51942daa23772439379496064e.tar.gz
misskey-1f4ae2f63a609d51942daa23772439379496064e.tar.bz2
misskey-1f4ae2f63a609d51942daa23772439379496064e.zip
Use mfm-js for MFM parsing (#7415)
* wip * Update mfm.ts * wip * update mfmjs * refactor * nanka * Update mfm.ts * Update to-html.ts * Update to-html.ts * wip * fix test * fix test
Diffstat (limited to 'src/misc/extract-emojis.ts')
-rw-r--r--src/misc/extract-emojis.ts9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/misc/extract-emojis.ts b/src/misc/extract-emojis.ts
deleted file mode 100644
index 2c57e9a8aa..0000000000
--- a/src/misc/extract-emojis.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-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);
-}