mirror of
https://github.com/orhun/git-cliff.git
synced 2024-09-11 15:05:30 +03:00
fix: add legacy fix for body field
This commit is contained in:
parent
32da6d3903
commit
208f0b9adf
@ -294,9 +294,15 @@ impl Commit<'_> {
|
||||
if let (Some(field_name), Some(pattern_regex)) =
|
||||
(parser.field.as_ref(), parser.pattern.as_ref())
|
||||
{
|
||||
match tera::dotted_pointer(&lookup_context, field_name) {
|
||||
let value = if field_name == "body" {
|
||||
body.clone()
|
||||
} else {
|
||||
tera::dotted_pointer(&lookup_context, field_name)
|
||||
.map(|v| v.to_string())
|
||||
};
|
||||
match value {
|
||||
Some(value) => {
|
||||
regex_checks.push((pattern_regex, value.to_string()));
|
||||
regex_checks.push((pattern_regex, value));
|
||||
}
|
||||
None => {
|
||||
return Err(AppError::FieldError(format!(
|
||||
|
Loading…
Reference in New Issue
Block a user