extendWhile
fun LineCursor.extendWhile(from: Int = 1, end: BlockEnd = BlockEnd.BEFORE_TERMINATOR, continues: (LineCursor) -> Boolean): BlockExtent
Resolves an extent that grows for as long as continues accepts the line after it. Paragraphs, block quotes, footnote definitions, table rows and blank runs differ only in the predicate and in end.
Return
the resolved extent
Parameters
from
amount of lines already consumed, at least one
end
where the block's text ends relative to its last line
continues
tested on a cursor positioned at the candidate next line, which can therefore look both forward and back with LineCursor.peek