Crst::SectionParser
Inherits Reference < Object
Parses RST sections (titled divisions of a document)
Extracted from Parser to handle section detection, level tracking, and section content parsing.
Constants
TRANSITION_CHARS = Set.new(['!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']', '^', '_', '`', '{', '|', '}', '~'])
Transition characters (RST spec)
Constructors
new(parser : Parser)
SourceInstance methods
adornment?(line : String) : Bool
Returns true when line is a flush-left section adornment: a non-empty line made of a single repeated transition character.
determine_level(adornment : String) : Int32
Sourcesection_start?(reader : LineReader) : Bool
Sourcetry_parse_section(reader : LineReader, document : Document, line_offset : Int32 = 0) : Bool
Attempt to parse a section at the current reader position Returns true if a section was parsed, false otherwise