markdown library

Parses text in a Markdown-like format and renders to HTML.

Classes

AutolinkExtensionSyntax
Matches autolinks like http://foo.com.
AutolinkSyntax
Matches autolinks like <http://foo.com>.
BlockHtmlSyntax
Parses inline HTML at the block level. This differs from other Markdown implementations in several ways: [...]
BlockParser
Maintains the internal state needed to parse a series of lines into blocks of Markdown suitable for further inline parsing.
BlockquoteSyntax
Parses email-style blockquotes: > quote.
BlockSyntax
BlockTagBlockHtmlSyntax
CodeBlockSyntax
Parses preformatted code blocks that are indented four spaces.
CodeSyntax
Matches backtick-enclosed inline code blocks.
CondensedHtmlRenderer
Translates a parsed AST to HTML. [...]
DelimiterRun
Document
Maintains the context needed to parse a Markdown document.
Element
A named tag that can contain other nodes.
EmailAutolinkSyntax
Matches autolinks like <foo@bar.example.com>. [...]
EmojiSyntax
Matches GitHub Markdown emoji syntax like :smile:. [...]
EmptyBlockSyntax
EscapeSyntax
Escape punctuation preceded by a backslash.
ExtensionSet
ExtensionSets provide a simple grouping mechanism for common Markdown flavors. [...]
FencedCodeBlockSyntax
Parses preformatted code blocks between two ~~~ or ``` sequences. [...]
HeaderSyntax
Parses atx-style headers: ## Header ##.
HeaderWithIdSyntax
Parses atx-style headers, and adds generated IDs to the generated elements.
HorizontalRuleSyntax
Parses horizontal rules like ---, _ _ _, * * *, etc.
HtmlRenderer
Translates a parsed AST to HTML.
ImageSyntax
Matches images like ![alternate text](url "optional title") and ![alternate text][label].
InlineHtmlSyntax
Leave inline HTML tags alone, from CommonMark 0.28. [...]
InlineParser
Maintains the internal state needed to parse inline span elements in Markdown.
InlineSyntax
Represents one kind of Markdown tag that can be parsed.
LineBreakSyntax
Represents a hard line break.
LinkReference
A link reference definition.
LinkSyntax
Matches links like [blah][label] and [blah](url).
ListItem
ListSyntax
Base class for both ordered and unordered lists.
LongBlockHtmlSyntax
A BlockHtmlSyntax that has a specific endPattern. [...]
Node
Base class for any AST item. [...]
NodeVisitor
Visitor pattern for the AST. [...]
OrderedListSyntax
Parses ordered lists.
OtherTagBlockHtmlSyntax
ParagraphSyntax
Parses paragraphs of regular text.
SetextHeaderSyntax
Parses setext-style headers.
SetextHeaderWithIdSyntax
Parses setext-style headers, and adds generated IDs to the generated elements.
StrikethroughSyntax
Matches strikethrough syntax according to the GFM spec.
TableSyntax
Parses tables.
TagState
Keeps track of a currently open tag while it is being parsed. [...]
TagSyntax
Matches syntax that has a pair of tags and becomes an element, like * for <em>. Allows nested tags.
Text
A plain text element.
TextRenderer
Translates a parsed AST to plain text. [...]
TextSyntax
Matches stuff that should just be passed through as straight text.
UnorderedListSyntax
Parses unordered lists.
UnparsedContent
Inline content that has not been parsed into inline nodes (strong, links, etc). [...]

Constants

htmlEntityPattern → const String
The regular expression pattern for HTML entities.
r'&([a-zA-Z0-9]+|#[0-9]+|#[xX][a-fA-F0-9]+);'
version → const String
packageVersion

Functions

markdownToHtml(String markdown, {Iterable<BlockSyntax> blockSyntaxes, Iterable<InlineSyntax> inlineSyntaxes, ExtensionSet extensionSet, Resolver linkResolver, Resolver imageLinkResolver, bool inlineOnly = false, bool checkable = false, bool emptyListDisabled = false}) → String
Converts the given string of Markdown to HTML.
Parses a link starting at start and end at end (excludive) [...]
renderToHtml(List<Node> nodes) → String
Renders nodes to HTML.

Typedefs

LinkMapper(InlineParser parser, String url) → String
Maps an URL (specified in a reference). If nothing to change, just return url. It can return null (if not a link), a String or a Link.
Resolver(String name, [String title]) Node