Skip to main content

normalize

Function normalize 

Source
pub fn normalize(candidate: &str) -> String
Expand description

Normalize any candidate summary to the contract: collapse runs of whitespace (including newlines) to single spaces, trim, and truncate to MAX_SUMMARY_LEN chars (never splitting a UTF-8 codepoint). Every composer runs its output through this.