NOTE: the latest version is 7.0.1
Try parsing a markdown String into Markdown.Block.Blocks.
Markdown.Block.Block
Often you'll want to render these Blocks directly:
Block
render renderer markdown = markdown |> Markdown.Parser.parse |> Result.mapError deadEndsToString |> Result.andThen (\ast -> Markdown.Renderer.render renderer ast) deadEndsToString deadEnds = deadEnds |> List.map Markdown.Parser.deadEndToString |> String.join "\n"
But you can also do a lot with the Blocks before passing them through:
Turn a parsing problem into the default String representation.
Try parsing a markdown String into
Markdown.Block.Blocks.Often you'll want to render these
Blocks directly:But you can also do a lot with the
Blocks before passing them through:Blocks (example: make each heading one level deeper)Blocks)