Skip to main content

marker_defect

Function marker_defect 

Source
pub fn marker_defect(destination: &str, text: &str) -> Option<String>
Expand description

The one definition of an ill-formed block document, shared by every splice and every reader that judges one: None for a whole-file destination or a well-formed document.

Ownership must be unambiguous: exactly one begin marker paired with exactly one end marker after it, or none of either. A second begin is a second block, which for the hook file pre-commit would still run, and a marker without its pair, or an end before its begin, is a block whose extent nothing can state.