pandoc-2.5: Conversion between markup formats

Copyright | Copyright (C) 2008-2018 John MacFarlane
License | GNU GPL, version 2 or above
Maintainer | John MacFarlane <jgm@berkeley.edu>
Stability | alpha
Portability | portable
Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Highlighting

Description

Exports functions for syntax highlighting.

Synopsis

- highlightingStyles :: [(String, Style)]
- languages :: [String]
- languagesByExtension :: String -> [String]
- highlight :: SyntaxMap -> (FormatOptions -> [SourceLine] -> a) -> Attr -> String -> Either String a
- formatLaTeXInline :: FormatOptions -> [SourceLine] -> Text
- formatLaTeXBlock :: FormatOptions -> [SourceLine] -> Text
- styleToLaTeX :: Style -> Text
- formatHtmlInline :: FormatOptions -> [SourceLine] -> Html
- formatHtmlBlock :: FormatOptions -> [SourceLine] -> Html
- styleToCss :: Style -> String
- pygments :: Style
- espresso :: Style
- zenburn :: Style
- tango :: Style
- kate :: Style
- monochrome :: Style
- breezeDark :: Style
- haddock :: Style
- data Style
- fromListingsLanguage :: String -> Maybe String
- toListingsLanguage :: String -> Maybe String

# Documentation

highlightingStyles :: [(String, Style)] Source #

languages :: [String] Source #

languagesByExtension :: String -> [String] Source #

highlight Source #

Arguments

:: SyntaxMap |
-> (FormatOptions -> [SourceLine] -> a) | Formatter
-> Attr | Attributes of the CodeBlock
-> String | Raw contents of the CodeBlock
-> Either String a |

formatLaTeXInline :: FormatOptions -> [SourceLine] -> Text #

formatLaTeXBlock :: FormatOptions -> [SourceLine] -> Text #

styleToLaTeX :: Style -> Text #

formatHtmlInline :: FormatOptions -> [SourceLine] -> Html #

formatHtmlBlock :: FormatOptions -> [SourceLine] -> Html #

styleToCss :: Style -> String #

pygments :: Style #

espresso :: Style #

zenburn :: Style #

tango :: Style #

kate :: Style #

monochrome :: Style #

breezeDark :: Style #

haddock :: Style #

data Style #

Instances

Eq Style |
Instance details Defined in Skylighting.Types Methods (==) :: Style -> Style -> Bool Source # (/=) :: Style -> Style -> Bool Source #
Data Style |

Instance details

Defined in Skylighting.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Style -> c Style Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Style Source #

toConstr :: Style -> Constr Source #

dataTypeOf :: Style -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Style) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Style) Source #

gmapT :: (forall b. Data b => b -> b) -> Style -> Style Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Style -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Style -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Style -> m Style Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style Source #

Ord Style |
Instance details Defined in Skylighting.Types Methods compare :: Style -> Style -> Ordering Source # (<) :: Style -> Style -> Bool Source # (<=) :: Style -> Style -> Bool Source # (>) :: Style -> Style -> Bool Source # (>=) :: Style -> Style -> Bool Source # max :: Style -> Style -> Style Source # min :: Style -> Style -> Style Source #
Read Style |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS Style Source # readList :: ReadS [Style] Source # readPrec :: ReadPrec Style Source # readListPrec :: ReadPrec [Style] Source #
Show Style |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> Style -> ShowS Source # show :: Style -> String Source # showList :: [Style] -> ShowS Source #
Generic Style |
Instance details Defined in Skylighting.Types Associated Types type Rep Style :: Type -> Type Source # Methods from :: Style -> Rep Style x Source # to :: Rep Style x -> Style Source #
ToJSON Style |
Instance details Defined in Skylighting.Types Methods toJSON :: Style -> Value Source # toEncoding :: Style -> Encoding Source # toJSONList :: [Style] -> Value Source # toEncodingList :: [Style] -> Encoding Source #
FromJSON Style |
Instance details Defined in Skylighting.Types Methods parseJSON :: Value -> Parser Style Source # parseJSONList :: Value -> Parser [Style] Source #
Binary Style |
Instance details Defined in Skylighting.Types Methods put :: Style -> Put Source # get :: Get Style Source # putList :: [Style] -> Put Source #
type Rep Style |

Instance details

Defined in Skylighting.Types

type Rep Style = D1 (MetaData "Style" "Skylighting.Types" "skylighting-core-0.7.7-81AHpifW3t9HmIz6y9x4fL" False) (C1 (MetaCons "Style" PrefixI True) ((S1 (MetaSel (Just "tokenStyles") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map TokenType TokenStyle)) :*: S1 (MetaSel (Just "defaultColor") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Color))) :*: (S1 (MetaSel (Just "backgroundColor") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Color)) :*: (S1 (MetaSel (Just "lineNumberColor") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Color)) :*: S1 (MetaSel (Just "lineNumberBackgroundColor") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Color))))))

fromListingsLanguage :: String -> Maybe String Source #

Determine skylighting language name from listings language name.

toListingsLanguage :: String -> Maybe String Source #

Determine listings language name from skylighting language name.