Skip to main content

parse

Function parse 

Source
pub fn parse(text: &str) -> Vec<Row>
Expand description

Read a unified diff into rows.

Anything the format does not describe as a line of the file becomes Kind::Sep with its text kept: an unreadable row is a row a person should see, not a row to drop silently. That is also what makes this safe on a diff written by git, which carries a preamble and \ No newline notes this crate’s own renderer never emits.