Safe Haskell | None |
---|---|
Language | Haskell2010 |
Helpers for working with Pandoc documents
Synopsis
- parse :: (ReaderOptions -> Text -> PandocIO Pandoc) -> SourceReader Pandoc
- parsePure :: (ReaderOptions -> Text -> PandocPure Pandoc) -> Text -> Either Text Pandoc
- render :: Pandoc -> Html ()
- renderPandocInlines :: [Inline] -> Html ()
- extractMeta :: Pandoc -> Maybe (Either Text Value)
- getH1 :: Pandoc -> Maybe (Html ())
- getFirstImg :: Pandoc -> Maybe Text
- data Pandoc
- module Text.Pandoc.Readers
Parsing
:: (ReaderOptions -> Text -> PandocIO Pandoc) | The pandoc text reader function to use, eg: |
-> SourceReader Pandoc |
SourceReader
for parsing a lightweight markup language using Pandoc
parsePure :: (ReaderOptions -> Text -> PandocPure Pandoc) -> Text -> Either Text Pandoc Source #
Pure version of parse
Rendering
renderPandocInlines :: [Inline] -> Html () Source #
Extracting information
extractMeta :: Pandoc -> Maybe (Either Text Value) Source #
Extract the Pandoc metadata as JSON value
Get the first image in the document if one exists
Re-exports
Instances
Eq Pandoc | |
Data Pandoc | |
Defined in Text.Pandoc.Definition gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pandoc -> c Pandoc # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Pandoc # toConstr :: Pandoc -> Constr # dataTypeOf :: Pandoc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Pandoc) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Pandoc) # gmapT :: (forall b. Data b => b -> b) -> Pandoc -> Pandoc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pandoc -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pandoc -> r # gmapQ :: (forall d. Data d => d -> u) -> Pandoc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pandoc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pandoc -> m Pandoc # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pandoc -> m Pandoc # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pandoc -> m Pandoc # | |
Ord Pandoc | |
Read Pandoc | |
Show Pandoc | |
Generic Pandoc | |
Semigroup Pandoc | |
Monoid Pandoc | |
ToJSON Pandoc | |
Defined in Text.Pandoc.Definition | |
FromJSON Pandoc | |
NFData Pandoc | |
Defined in Text.Pandoc.Definition | |
HasMeta Pandoc | |
Defined in Text.Pandoc.Builder | |
Walkable Block Pandoc | |
Walkable Inline Pandoc | |
Walkable Pandoc Pandoc | |
Walkable [Block] Pandoc | |
Walkable [Inline] Pandoc | |
type Rep Pandoc | |
Defined in Text.Pandoc.Definition type Rep Pandoc = D1 (MetaData "Pandoc" "Text.Pandoc.Definition" "pandoc-types-1.17.6.1-Dl6X034t44f6zwy1CmK678" False) (C1 (MetaCons "Pandoc" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Meta) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Block]))) |
module Text.Pandoc.Readers