UNPKG

docutils-ts

Version:

Port of the Python Docutils library to TypeScript

21 lines (20 loc) 641 B
import SpecializedBody from './specializedBody.js'; /** * Second and subsequent lines of a line_block. */ class LineBlock extends SpecializedBody { blank() { this.invalid_input(); } /** New line of line block. */ line_block(match, context, nextState) { const lineno = this.rstStateMachine.absLineNumber(); const [line, messages, blankFinish] = this.line_block_line(match, lineno); this.parent.add(line); this.parent.parent.add(messages); this.blankFinish = blankFinish; return [[], nextState, []]; } } LineBlock.stateName = 'LineBlock'; export default LineBlock;