Expand description
Store-aware readers that synthesize inline content views from
per-block format_runs + block_images. The canonical entry
point is inline_segments_for_block, which returns the
Vec<InlineSegment> view used by export, fragments, cursor, and
tests.
Functions§
- addressable_
inline_ pieces_ for_ block - The block’s inline pieces (text runs, images, footnote references), addressed in the
document’s own addressable character space — the same space
TextDocument:: to_addressable_text(),find_allmatch positions, and a block’sdocument_positionall share. Seecrate::format_runs::AddressableInlinePiece’s doc comment for the hazard this closes:FormatRun/ImageAnchoroffsets are UTF-8 bytes local to this one block, document-wide offsets are characters, and a caller bridging the two by hand (or not at all) is exactly how a comment anchored right after a table landed two characters off (seeTextDocument::to_addressable_text’s doc comment for that incident). - get_
block_ footnote_ refs - Fetch the footnote references anchored in a block.
- get_
block_ images - Fetch the image anchors for a block.
- get_
format_ runs - Fetch the format runs for a block. Returns an empty Vec if the block has no runs (treated the same as a missing entry).
- inline_
segments_ for_ block - Synthesize the
Vec<InlineSegment>view for a block from its format_runs and block_images. Callers must pass the block’splain_text(which they already have in scope from a priorget_blockcall) — this avoids re-locking the blocks table.