class
Crst::BlockParser
- Crst::BlockParser
- Reference
- Object
Overview
Parses block-level RST elements (paragraphs, lists, tables, quotes, etc.)
Extracted from Parser to handle all non-section, non-explicit-markup block content.
Defined in:
crst/block_parser.crConstant Summary
-
BULLET_CHARS =
/[-\*\+]/ -
ENUM_ALPHA_DOT =
/^[a-zA-Z]\.\s+/ -
ENUM_ALPHA_PAREN =
/^[a-zA-Z]\)\s+/ -
ENUM_DIGIT_DOT =
/^\d+\.\s+/ -
ENUM_DIGIT_PAREN =
/^\d+\)\s+/ -
ENUM_ROMAN_DOT =
/^[ivxlcdmIVXLCDM]+\.\s+/ -
ENUM_ROMAN_PAREN =
/^[ivxlcdmIVXLCDM]+\)\s+/ -
MULTIPLE_SPACES =
/\s{2,}/ -
NON_SPACE_CHAR =
/[^ ]/
Constructors
Instance Method Summary
- #bullet_item?(line : String) : Bool
- #dedent_lines(lines : Array(String)) : Array(String)
- #enum_item?(line : String) : Bool
-
#parse_block(lines : Array(String), line_offset : Int32 = 0, allow_sections : Bool = true) : Array(Node)
Parses a block of lines into nodes This creates a new LineReader for the block context
- #parse_block_content(reader : LineReader, document : Document)