pandoc-3.7.0.2: Conversion between markup formats

Copyright | Copyright (C) 2006-2024 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.Readers.Markdown

Description

Conversion of markdown-formatted plain text to `Pandoc` document.

Synopsis

- readMarkdown :: (PandocMonad m, ToSources a) => ReaderOptions -> a -> m Pandoc
- yamlToMeta :: PandocMonad m => ReaderOptions -> Maybe FilePath -> ByteString -> m Meta
- yamlToRefs :: PandocMonad m => (Text -> Bool) -> ReaderOptions -> Maybe FilePath -> ByteString -> m [MetaValue]

# Documentation

readMarkdown #

Arguments

:: (PandocMonad m, ToSources a) |
=> ReaderOptions | Reader options
-> a | Input
-> m Pandoc |

Read markdown from an input string and return a Pandoc document.

yamlToMeta :: PandocMonad m => ReaderOptions -> Maybe FilePath -> ByteString -> m Meta #

Read a YAML string and convert it to pandoc metadata. String scalars in the YAML are parsed as Markdown.

yamlToRefs :: PandocMonad m => (Text -> Bool) -> ReaderOptions -> Maybe FilePath -> ByteString -> m [MetaValue] #

Read a YAML string and extract references from the `references` field, filter using an id predicate and parsing fields as Markdown.