aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Emoji.hs
AgeCommit message (Collapse)AuthorFilesLines
2020-03-15Use implicit Prelude (#6187)Albert Krewinkel1-2/+0
* Use implicit Prelude The previous behavior was introduced as a fix for #4464. It seems that this change alone did not fix the issue, and `stack ghci` and `cabal repl` only work with GHC 8.4.1 or newer, as no custom Prelude is loaded for these versions. Given this, it seems cleaner to revert to the implicit Prelude. * PandocMonad: remove outdated check for base version Only base versions 4.9 and later are supported, the check for `MIN_VERSION_base(4,8,0)` is therefore unnecessary. * Always use custom prelude Previously, the custom prelude was used only with older GHC versions, as a workaround for problems with ghci. The ghci problems are resolved by replacing package `base` with `base-noprelude`, allowing for consistent use of the custom prelude across all GHC versions.
2020-02-07Resolve HLint warningsAlbert Krewinkel1-1/+0
All warnings are either fixed or, if more appropriate, HLint is configured to ignore them. HLint suggestions remain. * Ignore "Use camelCase" warnings in Lua and legacy code * Fix or ignore remaining HLint warnings * Remove redundant brackets * Remove redundant `return`s * Remove redundant as-pattern * Fuse mapM_/map * Use `.` to shorten code * Remove redundant `fmap` * Remove unused LANGUAGE pragmas * Hoist `not` in Text.Pandoc.App * Use fewer imports for `Text.DocTemplates` * Remove redundant `do`s * Remove redundant `$`s * Jira reader: remove unnecessary parentheses
2019-12-08Use external emojis package.John MacFarlane1-7/+7
Moved the emoji-specified code into an external package we can depend on.
2019-12-03Move data/emoji.json to emoji.json, add to extra-source-files.John MacFarlane1-1/+1
This doesn't really belong in data-files as it's not loaded dynamically.
2019-11-27Generate Emoji module with TH.John MacFarlane1-1793/+3
- Add Text.Pandoc.Emoji.TH. - Replace long literal list in Text.Pandoc.Emoji with one-liner generating it from data/emoji.json using TH. - Add Makefile target to download data/emoji.json. - Remove tools/emoji.hs.
2019-11-12Switch to new pandoc-types and use Text instead of String [API change].despresc1-2/+4
PR #5884. + Use pandoc-types 1.20 and texmath 0.12. + Text is now used instead of String, with a few exceptions. + In the MediaBag module, some of the types using Strings were switched to use FilePath instead (not Text). + In the Parsing module, new parsers `manyChar`, `many1Char`, `manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`, `mantyUntilChar` have been added: these are like their unsuffixed counterparts but pack some or all of their output. + `glob` in Text.Pandoc.Class still takes String since it seems to be intended as an interface to Glob, which uses strings. It seems to be used only once in the package, in the EPUB writer, so that is not hard to change.
2019-07-29Update emoji list in Text.Pandoc.Emoji.John MacFarlane1-8/+929
Done using tools/emojis.hs, which uses the list from the gem GitHub uses. Future updates can be done with this tool. Closes #5666.
2019-03-01Remove license boilerplate.John MacFarlane1-18/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2018-07-15Wrap emojis in span nodes (#4759)Anders Waldenborg1-1/+6
Text.Pandoc.Emoji now exports `emojiToInline`, which returns a Span inline containing the emoji character and some attributes with metadata (class `emoji`, attribute `data-emoji` with emoji name). Previously, emojis (as supported in Markdown and CommonMark readers, e.g ":smile:") were simply translated into the corresponding unicode code point. By wrapping them in Span nodes, we make it possible to do special handling such as giving them a special font in HTML output. We also open up the possibility of treating them differently when the `--ascii` option is selected (though that is not part of this commit). Closes #4743.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2017-10-27hlint suggestions.John MacFarlane1-1/+0
2015-12-04Fixed Emoji character definitions.John MacFarlane1-870/+871
There were many bugs in the definitions. Closes #2523.
2015-11-13Text.Pandoc.Emoji: use hex escapes instead of Unicode in source.John MacFarlane1-870/+870
Some of the unicode characters cause ghc parse errors in older ghc versions.
2015-11-13Added `emoji` extension to Markdown.John MacFarlane1-0/+905
This is enabled by default in `markdown_github`. Added `Ext_emoji` to `Extension` in `Text.Pandoc.Options` (API change). Closes #2523.