listPattern top-level property

RegExp listPattern
final

Unordered list A line starting with one of these markers: -, *, +. May have up to three leading spaces before the marker and any number of spaces or tabs after.

Ordered list

A line starting with a number like 123.. May have up to three leading spaces before the marker and any number of spaces or tabs after.

Implementation

final listPattern =
    RegExp(r'^[ ]{0,3}(?:(\d{1,9})[\.)]|[*+-])(?:[ \t]+(.*))?$');