aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-12-03 16:38:19 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2019-12-03 16:38:19 -0800
commit6c435a17cd48af40dbf87ebbec8baf6ac6aabe27 (patch)
tree3d30780395eec2064d3348346685d89b4bb7736b
parent3afd0c7f5bc6f6b0e3e81816680f67a913c0dce4 (diff)
downloadpandoc-6c435a17cd48af40dbf87ebbec8baf6ac6aabe27.tar.gz
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.
-rw-r--r--COPYRIGHT2
-rw-r--r--emoji.json (renamed from data/emoji.json)0
-rw-r--r--pandoc.cabal2
-rw-r--r--src/Text/Pandoc/Emoji.hs2
4 files changed, 4 insertions, 2 deletions
diff --git a/COPYRIGHT b/COPYRIGHT
index 4f8070594..b19318bfc 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -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.
diff --git a/data/emoji.json b/emoji.json
index 17a091608..17a091608 100644
--- a/data/emoji.json
+++ b/emoji.json
diff --git a/pandoc.cabal b/pandoc.cabal
index fba1a27cb..c69540b9b 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -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
diff --git a/src/Text/Pandoc/Emoji.hs b/src/Text/Pandoc/Emoji.hs
index b10321760..823f9450d 100644
--- a/src/Text/Pandoc/Emoji.hs
+++ b/src/Text/Pandoc/Emoji.hs
@@ -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