module Poor::Markdown
Overview
Basic Markdown parser.
Defined in:
markdown.crClass Method Summary
-
.atx_heading?(line : String) : MarkdownHeading | Nil
Determines whether line is an ATX heading.
- .code_fence?(str : String) : MarkdownFence | Nil
-
.each_top_level_block(io : IO, &)
Parses the content of io and yields each top-level block as
Markup
. -
.parse(io : IO, builder : Poor::Builder | Poor::Stream)
Parses the content of io and adds each top-level block represented as
Markup
to builder. -
.setext_underline?(str : String) : Int8 | Nil
Determines whether str is a setext heading underline, that is a line, optionally indented by up to three spaces, consisting entirely of '=' or entirely of '-' characters.
- .unordered_list_item?(line : String) : MarkdownListItem | Nil
Class Method Detail
Determines whether line is an ATX heading.
An ATX heading starts with one or more #
characters
and its level is determined by their number.
The content of the heading, if present, must be separated by one
space from the marker prefix.
Parses the content of io and yields each top-level block
as Markup
.
Parses the content of io and adds each top-level block
represented as Markup
to builder.
Determines whether str is a setext heading underline, that is a line, optionally indented by up to three spaces, consisting entirely of '=' or entirely of '-' characters.