MCPcopy Create free account
hub / github.com/PoiScript/orgize / replace_range

Method replace_range

src/replace.rs:115–150  ·  view source on GitHub ↗

Replace specified range with given text, and reparse the syntax tree with current config This method optimizes parsing by analyzing the selected range and given text, and reducing the amount of data processed by parser. ```rust use orgize::{Org, ast::Headline, TextRange, TextSize}; let mut org = Org::parse("** hello"); let hdl = org.first_node:: ().unwrap(); assert_eq!(hdl.level(), 2);

(&mut self, range: TextRange, replace_with: impl AsRef<str>)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

full_parseMethod · 0.80
replace_headlineMethod · 0.80

Calls 8

follows_newlineFunction · 0.85
as_refMethod · 0.80
documentMethod · 0.80
replace_headlineMethod · 0.80
full_parseMethod · 0.80
endMethod · 0.45
syntaxMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected