Safe Haskell | None |
---|---|
Language | Haskell2010 |
Parsing Markdown using the mmark parser.
Synopsis
- parse :: Path Rel File -> Action MMark
- parsePure :: FilePath -> Text -> Either Text MMark
- parseWith :: [Extension] -> Path Rel File -> Action MMark
- parsePureWith :: [Extension] -> FilePath -> Text -> Either Text MMark
- defaultExts :: [Extension]
- render :: Monad m => MMark -> HtmlT m ()
- getFirstImg :: MMark -> Maybe URI
- getFirstParagraphText :: MMark -> Maybe Text
- projectYaml :: MMark -> Maybe Value
- data MMark
Parsing
:: FilePath | Filepath corresponding to the text to be parsed (used only in parse errors) |
-> Text | Text to be parsed |
-> Either Text MMark |
Pure version of parse
parseWith :: [Extension] -> Path Rel File -> Action MMark Source #
Like parse
but takes a custom list of MMark extensions
:: [Extension] | |
-> FilePath | Filepath corresponding to the text to be parsed (used only in parse errors) |
-> Text | Text to be parsed |
-> Either Text MMark |
Like parsePure
but takes a custom list of MMark extensions
defaultExts :: [Extension] Source #
Rendering
Extracting information
getFirstParagraphText :: MMark -> Maybe Text Source #
Get the first paragraph text of a MMark document.
Useful to determine "preview" of your notes.
projectYaml :: MMark -> Maybe Value #
Extract contents of an optional YAML block that may have been parsed.