Skip to main content

find_non_agent_html_comment_ranges

Function find_non_agent_html_comment_ranges 

Source
pub fn find_non_agent_html_comment_ranges(doc: &str) -> Vec<(usize, usize)>
Expand description

Find byte ranges for ordinary HTML comments, skipping code spans/blocks and preserving agent: markers for the component parser.

If an ordinary comment is currently unterminated, treat the rest of the document as comment body. Users can be editing a scratch comment while an agent-doc cycle is running; prompt-like text in that transiently broken comment must not be interpreted as escaped exchange content and moved or stripped by repair.