Safe Haskell | None |
---|---|
Language | Haskell2010 |
Helpers for working with Pandoc documents
Synopsis
- parse :: (ReaderOptions -> Text -> PandocIO Pandoc) -> Text -> IO Pandoc
- parsePure :: (ReaderOptions -> Text -> PandocPure Pandoc) -> Text -> Pandoc
- render :: Pandoc -> Html ()
- renderInlines :: [Inline] -> Html ()
- getMeta :: IsMetaValue a => String -> Pandoc -> Maybe a
- setMeta :: Show a => String -> a -> Pandoc -> Pandoc
- parseMeta :: ByteString -> IO Meta
- getH1 :: Pandoc -> Maybe (Html ())
- getFirstImg :: Pandoc -> Maybe Text
Parsing
:: (ReaderOptions -> Text -> PandocIO Pandoc) | Document format. Example: |
-> Text | Source text to parse |
-> IO Pandoc |
Parse the source text as a Pandoc document
Supports the includeCode extension.
parsePure :: (ReaderOptions -> Text -> PandocPure Pandoc) -> Text -> Pandoc Source #
Pure version of parse
Converting to HTML
renderInlines :: [Inline] -> Html () Source #
Metadata
getMeta :: IsMetaValue a => String -> Pandoc -> Maybe a Source #
Get the metadata value for the given key in a Pandoc document.
It is recommended to call this function with type application specifying the
type of a
.
MetaValue
is parsed in accordance with the IsMetaValue
class constraint.
Available instances:
setMeta :: Show a => String -> a -> Pandoc -> Pandoc Source #
Add, or set, a metadata data key to the given Haskell value