Expand description
Line preprocessing: docutils statemachine.string2lines(tab_width=8, convert_whitespace=True) equivalent, producing the parser’s line stream
as index-based LineRec records over a processed source text.
Probe-verified semantics (docutils 0.22.4):
\v/\fbecome single spaces (convert_whitespace).- Lines split on
\n,\r\n,\r(plus Pythonsplitlinesexotics:\x1c-\x1e,\u{85},\u{2028},\u{2029}). - Tabs expand to the next multiple-of-8 column (character columns).
- Trailing whitespace stripped per line.
- One processed line == one source line, so message line numbers are
processed index + 1.
Structs§
- LineRec
- One line of the parser’s stream:
(source, lineno)provenance plus the byte range of the line’s current (possibly dedented) view into the processed text of its source. - Lines
- The processed form of one source: its lines joined with
\n(the text everyLineRecrange indexes) plus the single-source record stream.