pub fn parse_footers(footers: &str) -> Result<Vec<Footer>, ParseError>Expand description
Parse commit footers only
ยงExample :
use conventional_commit_parser::parse_footers;
use conventional_commit_parser::commit::*;
let footer = r#"a-token: this is a token
another-token #this is a token with hash separator"#;
let parsed = parse_footers(footer).expect("Parse error");
assert_eq!(parsed, vec![
Footer {
token: "a-token".to_string(),
content: "this is a token".to_string(),
token_separator: Separator::Colon
},
Footer {
token: "another-token".to_string(),
content: "this is a token with hash separator".to_string(),
token_separator: Separator::Hash
}
]);