Skip to main content

looks_like_search_replace

Function looks_like_search_replace 

Source
pub fn looks_like_search_replace(input: &str) -> bool
Expand description

True when the payload is a SEARCH/REPLACE or DiffFenced document.

First non-empty line must be <<<<<<< SEARCH or a fence (```) so a unified diff that happens to mention that marker as later content is still parsed as a unified diff.