UNPKG

docutils-ts

Version:

Port of the Python Docutils library to TypeScript

16 lines (15 loc) 560 B
import SpecializedBody from './specializedBody.js'; class BulletList extends SpecializedBody { bullet(match, context, nextState) { if (match.result.input[0] !== this.parent.attributes.bullet) { // @ts-ignore this.invalid_input(); } const [listitem, blankFinish] = this.list_item(match.result.index + match.result[0].length); this.parent.add(listitem); this.blankFinish = blankFinish; return [[], nextState, []]; } } BulletList.stateName = 'BulletList'; export default BulletList;