jxxcarlson/elm-markdown/2.1.3

NOTE: the latest version is 10.1.0

MDInline

Module MDInline provides one type and two functions. The type is MDInline, which is the type of inline Markdown elements such as italic and bold. The parse function parses a string into an MMinline value, a custom type with parts such as Paragraph, Line, Italic, Bold, Ordered and Unnumbered lists, etc.

The MDInline.parse function is used in the second of the two parsing operations. A string is first parsed into a hierarchical list -- a list of strings paired with an integer level. The hierarchical list is converted to tree. The parser in This module is mapped over the nodes of the tree to form a new tree.

The MDInline.string function is used to give a string representation of the BlockMMTree values.

= OrdinaryText String
| ItalicText String
| BoldText String
| Code String
| InlineMath String
| StrikeThroughText String
| BracketedText String
| Link String String
| Image String String
| Line (List MDInline)
| Paragraph (List MDInline)
| Stanza String
| Error (List MDInline)

The type for inline Markdown elements

parse : Option -> String -> MDInline

MDInline parser

string : MDInline -> String

String representation of an MDInline value