Expand description
Shared line patterns (ported from pattern.ts) as small predicates/helpers.
Functions§
- is_
dash_ with_ space /^\s*-\s+$/- is_
incomplete_ task_ list /^\s*-\s*\[\s*$/- is_
quote_ incomplete_ task_ list /^>\s*-\s*\[\s*$/- is_
quote_ standalone_ dash /^>\s*-$/- is_
quote_ task_ list /^>\s*- \[[x ]\]/i- is_
standalone_ dash /^\s*-$/- is_
table_ row_ line /^\|.*\|.*\|/— line looks like a table row (>= 3 pipes).- is_
table_ separator_ line /^\|[\s:]*-{3,}[\s:]*(?:\|[\s:]*-{3,}[\s:]*)+\|?$/- is_
task_ list /^\s*- \[[x ]\]/i- remove_
trailing_ standalone_ dash - Remove a trailing standalone
-line (pattern/(\n\n?)-[ \t]*$/): returns content with that dash line removed, newlines preserved.