class
Crst::SectionParser
- Crst::SectionParser
- Reference
- Object
Overview
Parses RST sections (titled divisions of a document)
Extracted from Parser to handle section detection, level tracking, and section content parsing.
Defined in:
crst/section_parser.crConstant Summary
-
TRANSITION_CHARS =
Set.new(['!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']', '^', '_', '`', '{', '|', '}', '~']) -
Transition characters (RST spec)
Constructors
Instance Method Summary
-
#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
- #section_start?(reader : LineReader) : Bool
-
#try_parse_section(reader : LineReader, document : Document) : Bool
Attempt to parse a section at the current reader position Returns true if a section was parsed, false otherwise
Constructor Detail
Instance Method Detail
def 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.
Attempt to parse a section at the current reader position Returns true if a section was parsed, false otherwise