diff options
author | David Robillard <d@drobilla.net> | 2021-08-12 23:11:20 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-28 21:57:07 -0500 |
commit | 04ac8e8c12044da5befe0559eb36634babcf771a (patch) | |
tree | 42610400a38d08582b976c74b64c854ff949ba02 | |
parent | 1409f161793a289819df1f31eccb579b71f45475 (diff) | |
download | serd-04ac8e8c12044da5befe0559eb36634babcf771a.tar.gz serd-04ac8e8c12044da5befe0559eb36634babcf771a.tar.bz2 serd-04ac8e8c12044da5befe0559eb36634babcf771a.zip |
Ensure that indentation is always reset with the writer context
-rw-r--r-- | src/writer.c | 4 |
1 files changed, 1 insertions, 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; } |