Move data/emoji.json to emoji.json, add to extra-source-files.

This doesn't really belong in data-files as it's not loaded
dynamically.
This commit is contained in:
John MacFarlane 2019-12-03 16:38:19 -08:00
parent 3afd0c7f5b
commit 6c435a17cd
4 changed files with 4 additions and 2 deletions

View file

@ -198,7 +198,7 @@ revised by Martin Paul Eve and then John MacFarlane.
License. Originally by Martin Fenner."
------------------------------------------------------------------------
The file data/emoji.json is derived from https://github.com/github/gemoji.
The file emoji.json is derived from https://github.com/github/gemoji.
Copyright (c) 2019 GitHub, Inc.

View file

@ -189,6 +189,8 @@ extra-source-files:
-- files needed to build man page
man/manfilter.lua
man/pandoc.1.template
-- data files used by TH
emoji.json
-- trypandoc
trypandoc/Makefile
trypandoc/index.html

View file

@ -20,7 +20,7 @@ import Text.Pandoc.Definition (Inline (Span, Str))
import Text.Pandoc.Emoji.TH (genEmojis)
emojis :: M.Map T.Text T.Text
emojis = M.fromList $(genEmojis "data/emoji.json")
emojis = M.fromList $(genEmojis "emoji.json")
emojiToInline :: T.Text -> Maybe Inline
emojiToInline emojikey = makeSpan <$> M.lookup emojikey emojis