class

Crst::BlockParser

Inherits Reference < Object

Parses block-level RST elements (paragraphs, lists, tables, quotes, etc.)

Extracted from Parser to handle all non-section, non-explicit-markup block content.

Constants

BULLET_CHARS = /[-\*\+]/
ENUM_ALPHA_DOT = /^[a-zA-Z]\.\s+/
ENUM_ALPHA_PAREN = /^[a-zA-Z]\)\s+/
ENUM_AUTO_DOT = /^#([a-zA-Z0-9_-]+)?\.\s+/
ENUM_AUTO_PAREN = /^#([a-zA-Z0-9_-]+)?\)\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 = /[^\t ]/

Constructors

new(parser : Parser, config : Config, inline_parser : InlineParser)
Source

Instance methods

bullet_item?(line : String) : Bool
Source
dedent_lines(lines : Array(String)) : Tuple(Array(String), Int32)
Source
enum_item?(line : String) : Bool
Source
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

Source
parse_block_content(reader : LineReader, document : Document)
Source