pandoc-2.17.1.1: Conversion between markup formats
CopyrightCopyright (C) 2008-2022 John MacFarlane
LicenseGNU GPL, version 2 or above
MaintainerJohn MacFarlane <jgm@berkeley.edu>
Stabilityalpha
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Pandoc.Highlighting

Description

Exports functions for syntax highlighting.

Synopsis

Documentation

languages :: SyntaxMap -> [Text] Source #

languagesByExtension :: SyntaxMap -> Text -> [Text] Source #

highlight Source #

Arguments

:: SyntaxMap 
-> (FormatOptions -> [SourceLine] -> a)

Formatter

-> Attr

Attributes of the CodeBlock

-> Text

Raw contents of the CodeBlock

-> Either Text a 

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

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

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

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

data Style #

Instances

Instances details
FromJSON Style 
Instance details

Defined in Skylighting.Types

Methods

parseJSON :: Value -> Parser Style

parseJSONList :: Value -> Parser [Style]

ToJSON Style 
Instance details

Defined in Skylighting.Types

Methods

toJSON :: Style -> Value

toEncoding :: Style -> Encoding

toJSONList :: [Style] -> Value

toEncodingList :: [Style] -> Encoding

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 :: forall r r'. (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 #

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 #

Read Style 
Instance details

Defined in Skylighting.Types

Show Style 
Instance details

Defined in Skylighting.Types

Binary Style 
Instance details

Defined in Skylighting.Types

Eq Style 
Instance details

Defined in Skylighting.Types

Methods

(==) :: Style -> Style -> Bool Source #

(/=) :: Style -> Style -> Bool Source #

Ord Style 
Instance details

Defined in Skylighting.Types

type Rep Style 
Instance details

Defined in Skylighting.Types

type Rep Style = D1 ('MetaData "Style" "Skylighting.Types" "skylighting-core-0.12.3.1-CuEU4UN5vakF5EAt6BnVaV" 'False) (C1 ('MetaCons "Style" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tokenStyles") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map TokenType TokenStyle)) :*: S1 ('MetaSel ('Just "defaultColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color))) :*: (S1 ('MetaSel ('Just "backgroundColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color)) :*: (S1 ('MetaSel ('Just "lineNumberColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color)) :*: S1 ('MetaSel ('Just "lineNumberBackgroundColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color))))))

fromListingsLanguage :: Text -> Maybe Text Source #

Determine skylighting language name from listings language name.

toListingsLanguage :: Text -> Maybe Text Source #

Determine listings language name from skylighting language name.