diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-02-05 21:58:45 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-02-05 21:58:45 +0100 |
commit | 0bbea0cc7650af61870b310ebbf6fb8a9fec09a7 (patch) | |
tree | 2b043d80c75bba4e80968c6e79bc2970158fdaf2 /src/Text/Pandoc/Highlighting.hs | |
parent | f2103e7e7bc77dab00678b6b2cd7752bbbe63f55 (diff) | |
download | pandoc-0bbea0cc7650af61870b310ebbf6fb8a9fec09a7.tar.gz |
Split pandoc.hs into a module, Text.Pandoc.App, and a small program.
The App module provides a function that does a pandoc conversion,
based on option settings. The program (pandoc.hs) now does nothing
more than parse options and pass them to this function, which can
easily be used by other applications (e.g. a GUI wrapper).
The Opt structure has been further simplified.
API changes:
* New exposed module Text.Pandoc.App
* Text.Pandoc.Highlighting has been exposed.
* highlightingStyles has been moved to Text.Pandoc.Highlighting.
Diffstat (limited to 'src/Text/Pandoc/Highlighting.hs')
-rw-r--r-- | src/Text/Pandoc/Highlighting.hs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Highlighting.hs b/src/Text/Pandoc/Highlighting.hs index 896682389..df060915c 100644 --- a/src/Text/Pandoc/Highlighting.hs +++ b/src/Text/Pandoc/Highlighting.hs @@ -28,7 +28,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Exports functions for syntax highlighting. -} -module Text.Pandoc.Highlighting ( languages +module Text.Pandoc.Highlighting ( highlightingStyles + , languages , languagesByExtension , highlight , formatLaTeXInline @@ -57,6 +58,17 @@ import qualified Data.Map as M import Control.Monad import qualified Data.Text as T +highlightingStyles :: [(String, Style)] +highlightingStyles = + [("pygments", pygments), + ("tango", tango), + ("espresso", espresso), + ("zenburn", zenburn), + ("kate", kate), + ("monochrome", monochrome), + ("breezedark", breezeDark), + ("haddock", haddock)] + languages :: [String] languages = [T.unpack (T.toLower (sName s)) | s <- M.elems defaultSyntaxMap] |