From 070cbeb20775154aad7538145b547c0a98fc8c7b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 26 Jul 2011 20:43:43 +0000 Subject: Fix pretty printing of successive blank descriptions, i.e. "] , [". git-svn-id: http://svn.drobilla.net/serd/trunk@209 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- ChangeLog | 6 ++++++ src/writer.c | 12 +++++++++--- wscript | 3 +-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 46e32706..5337a87a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +serd (UNRELEASED) unstable; urgency=low + + * Fix pretty printing of successive blank descriptions, i.e. "] , [" + + -- David Robillard UNRELEASED + serd (0.4.2) unstable; urgency=low * Fix compilation issues on some systems diff --git a/src/writer.c b/src/writer.c index 137fed93..cb68ed46 100644 --- a/src/writer.c +++ b/src/writer.c @@ -334,11 +334,17 @@ serd_writer_write_statement(SerdWriter* writer, if (serd_node_equals(subject, &writer->context.subject)) { if (serd_node_equals(predicate, &writer->context.predicate)) { // Abbreviate S P - ++writer->indent; - serd_writer_write_delim(writer, ','); + if ((flags & SERD_ANON_O_BEGIN)) { + writer->sink(" , ", 3, writer->stream); // ] , [ + } else { + ++writer->indent; + serd_writer_write_delim(writer, ','); + } write_node(writer, object, object_datatype, object_lang, FIELD_OBJECT, flags); - --writer->indent; + if (!(flags & SERD_ANON_O_BEGIN)) { + --writer->indent; + } } else { // Abbreviate S if (writer->context.predicate.buf) { diff --git a/wscript b/wscript index c17742c3..433d291d 100644 --- a/wscript +++ b/wscript @@ -1,4 +1,3 @@ - #!/usr/bin/env python import filecmp import glob @@ -10,7 +9,7 @@ from waflib.extras import autowaf as autowaf import waflib.Logs as Logs, waflib.Options as Options # Version of this package (even if built as a child) -SERD_VERSION = '0.4.2' +SERD_VERSION = '0.4.3' SERD_MAJOR_VERSION = '0' # Library version (UNIX style major, minor, micro) -- cgit v1.2.1