aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-07-26 20:43:43 +0000
committerDavid Robillard <d@drobilla.net>2011-07-26 20:43:43 +0000
commit070cbeb20775154aad7538145b547c0a98fc8c7b (patch)
treec3d4dc6e825021d29acfc2bbd2aaea68331e7334 /src/writer.c
parentfb2e4b8c2059ee632bd907485aef74ac09f2cd61 (diff)
downloadserd-070cbeb20775154aad7538145b547c0a98fc8c7b.tar.gz
serd-070cbeb20775154aad7538145b547c0a98fc8c7b.tar.bz2
serd-070cbeb20775154aad7538145b547c0a98fc8c7b.zip
Fix pretty printing of successive blank descriptions, i.e. "] , [".
git-svn-id: http://svn.drobilla.net/serd/trunk@209 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c12
1 files changed, 9 insertions, 3 deletions
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) {