From b90126986fbeec6f42d469e99574096c3f6abc22 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 23 Nov 2021 21:26:20 +0300 Subject: Don't separate multi-line manifest value introducer from colon with space in manifest serializer --- libbutl/manifest-rewriter.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'libbutl/manifest-rewriter.cxx') diff --git a/libbutl/manifest-rewriter.cxx b/libbutl/manifest-rewriter.cxx index 3bddd37..1232e9c 100644 --- a/libbutl/manifest-rewriter.cxx +++ b/libbutl/manifest-rewriter.cxx @@ -73,8 +73,6 @@ namespace butl if (!nv.value.empty ()) { - os << ' '; - manifest_serializer s (os, path_.string (), long_lines_); // Note that the name can be surrounded with the ASCII whitespace @@ -86,7 +84,7 @@ namespace butl // s.write_value (nv.value, static_cast (nv.colon_pos - nv.start_pos) - - (nv.name.size () - utf8_length (nv.name)) + 2); + (nv.name.size () - utf8_length (nv.name)) + 1); } os << suffix; @@ -118,15 +116,13 @@ namespace butl if (!nv.value.empty ()) { - os << ' '; - // Note that the name can be surrounded with the ASCII whitespace // characters and the start_pos refers to the first character in the // line. // s.write_value (nv.value, static_cast (nv.colon_pos - nv.start_pos) - - (nv.name.size () - n) + 2); + (nv.name.size () - n) + 1); } os << suffix; -- cgit v1.1