From 04ac8e8c12044da5befe0559eb36634babcf771a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 12 Aug 2021 23:11:20 -0400 Subject: Ensure that indentation is always reset with the writer context --- src/writer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/writer.c b/src/writer.c index 452d3679..3c7a510a 100644 --- a/src/writer.c +++ b/src/writer.c @@ -728,6 +728,7 @@ reset_context(SerdWriter* writer, bool graph) writer->anon_stack_size = 0; writer->context.indented_object = false; + writer->indent = 0; writer->empty = false; } @@ -1361,7 +1362,6 @@ serd_writer_set_base_uri(SerdWriter* writer, const SerdNode* uri) TRY(st, esink("> .\n", 4, writer)); } - writer->indent = 0; reset_context(writer, true); return st; @@ -1408,9 +1408,7 @@ serd_writer_set_prefix(SerdWriter* writer, TRY(st, esink("> .\n", 4, writer)); } - writer->indent = 0; reset_context(writer, true); - return st; } -- cgit v1.2.1