diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-04-02 10:36:11 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-02 10:36:11 +0900 |
| commit | 1f4ae2f63a609d51942daa23772439379496064e (patch) | |
| tree | 55e67e216bd30b8a5c95f769e8696c4b885d1e61 /src/misc/extract-emojis.ts | |
| parent | tweak avatar generation (diff) | |
| download | misskey-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.ts | 9 |
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); -} |