commonmark-simple-0.2.0.0: Simple interface to commonmark-hs for parsing real-world Markdown.
Safe HaskellNone
LanguageHaskell2010

Commonmark.Simple

Description

A simple interface to the commonmark package for parsing real-world Markdown

Where 'real-world' means the kind of syntax used in the likes of Obsidian Markdown.

Synopsis

Documentation

parseMarkdownWithFrontMatter Source #

Arguments

:: forall meta (m :: Type -> Type) il bl. (FromJSON meta, m ~ Either ParseError, bl ~ Cm () Blocks, il ~ Cm () Inlines) 
=> SyntaxSpec m il bl 
-> FilePath

Path to file associated with this Markdown

-> Text

Markdown text to parse

-> Either Text (Maybe meta, Pandoc) 

Like parseMarkdown but also parses the YAML frontmatter

parseMarkdown :: FilePath -> Text -> Either Text Pandoc Source #

Parse a Markdown file using commonmark-hs with all extensions enabled

fullMarkdownSpec :: forall (m :: Type -> Type) il bl. SyntaxSpec' m il bl => SyntaxSpec m il bl Source #

GFM + official commonmark extensions