Skip to main content

coalesce_runs

Function coalesce_runs 

Source
pub fn coalesce_runs(runs: Vec<TextRun>, base: Font) -> Vec<TextRun>
Expand description

Merge adjacent runs whose styles came out equal, and drop runs that say nothing beyond base.

Every apply produces fragments; without this a document accumulates one run per edit until the run vector is longer than the text it describes.

Day API ↩ Guides· daybrite.dev