aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbutl/manifest-serializer.cxx7
-rw-r--r--libbutl/manifest-serializer.mxx3
2 files changed, 7 insertions, 3 deletions
diff --git a/libbutl/manifest-serializer.cxx b/libbutl/manifest-serializer.cxx
index 73255b0..3d73f47 100644
--- a/libbutl/manifest-serializer.cxx
+++ b/libbutl/manifest-serializer.cxx
@@ -76,10 +76,13 @@ namespace butl
{
if (n.empty ())
{
+ s_ = start;
+
+ // Start new manifest if the end-of-manifest pair is omitted.
+ //
if (!v.empty ())
- throw serialization (name_, "non-empty value in end pair");
+ return next (n, v);
- s_ = start;
break;
}
diff --git a/libbutl/manifest-serializer.mxx b/libbutl/manifest-serializer.mxx
index e063f17..a1864d6 100644
--- a/libbutl/manifest-serializer.mxx
+++ b/libbutl/manifest-serializer.mxx
@@ -55,7 +55,8 @@ LIBBUTL_MODEXPORT namespace butl
// with empty name and value. After that we can either have another
// start-of-manifest pair (in which case the whole sequence repeats
// from the beginning) or we get another end-of-manifest pair which
- // signals the end of stream.
+ // signals the end of stream. The end-of-manifest pair can be omitted
+ // if it is followed by the start-of-manifest pair.
//
void
next (const std::string& name, const std::string& value);