Transform fields contained into _format into strings

This commit is contained in:
ManyTheFish 2024-01-11 12:43:56 +01:00
parent 81b6128b29
commit 86270e6878
2 changed files with 6 additions and 11 deletions

View file

@ -951,11 +951,6 @@ fn format_value<'a>(
infos: &mut Vec<MatchBounds>,
compute_matches: bool,
) -> Value {
// early skip recursive function if nothing needs to be changed.
if !format_options.as_ref().map_or(false, FormatOptions::should_format) && !compute_matches {
return value;
}
match value {
Value::String(old_string) => {
let mut matcher = builder.build(&old_string);
@ -1023,7 +1018,7 @@ fn format_value<'a>(
let value = matcher.format(format_options);
Value::String(value.into_owned())
}
None => Value::Number(number),
None => Value::String(s),
}
}
value => value,