ema-0.4.0.0: Static site generator library with hot reload
Safe HaskellNone
LanguageHaskell2010

Ema.Helper.Markdown

Description

Helper to deal with Markdown files

TODO: Publish this eventually to Hackage, along with wiki-link stuff from emanote (maybe as separate package).

Synopsis

Documentation

parseMarkdownWithFrontMatter Source #

Arguments

:: forall meta m 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) 

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

fullMarkdownSpec :: SyntaxSpec' m il bl => SyntaxSpec m il bl Source #

GFM + official commonmark extensions

plainify :: [Inline] -> Text Source #

Convert Pandoc AST inlines to raw text.