Skip to main content

parse_conflicts

Function parse_conflicts 

Source
pub fn parse_conflicts(content: &str) -> Result<Vec<ConflictSegment>>
Expand description

Parse a conflicted file’s content into text/conflict segments.

Errors with Error::Parse only on a genuinely malformed region: a <<<<<<<-opened region missing its ======= separator or >>>>>>> terminator. A =======/>>>>>>> run outside any region is treated as ordinary content (a Markdown/RST underline, a divider, a quoted email), so a file with no real conflict — or a real conflict alongside marker-like content — parses cleanly.