Skip to main content

table_block_at

Function table_block_at 

Source
pub fn table_block_at(buffer: &EditorBuffer, row: usize) -> Option<TableBlock>
Expand description

Locates the GFM pipe-table block containing row, if any.

Pure in buffer text: looks for a header / delimiter pair adjacent to row and extends through contiguous piped body rows. Returns None for blank lines, fence lines, blockquotes, single-column pipe-less text (which is a setext heading, not a table), and bare --- (thematic break).

Single-shot helper: computes the fence index in one O(N) pass. Hot per-frame paths must hoist that pass per document version and call table_block_at_with_fences instead.