From 759cfac6e9bdf1d988a99b20a60981d50d1f904a Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Sat, 08 Apr 2023 19:45:47 +0000 Subject: [PATCH] fix: std.manifestJsonEx should respect custom newline value in empty objects and arrays --- --- a/crates/jrsonnet-evaluator/src/manifest.rs +++ b/crates/jrsonnet-evaluator/src/manifest.rs @@ -177,7 +177,8 @@ buf.push_str(cur_padding); } } else if mtype == JsonFormatting::Std { - buf.push_str("\n\n"); + buf.push_str(options.newline); + buf.push_str(options.newline); buf.push_str(cur_padding); } else if mtype == JsonFormatting::ToString || mtype == JsonFormatting::Manifest { buf.push(' '); @@ -226,7 +227,8 @@ buf.push_str(cur_padding); } } else if mtype == JsonFormatting::Std { - buf.push_str("\n\n"); + buf.push_str(options.newline); + buf.push_str(options.newline); buf.push_str(cur_padding); } else if mtype == JsonFormatting::ToString || mtype == JsonFormatting::Manifest { buf.push(' '); -- gitstuff