aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-08-09 18:28:35 -0400
committerDavid Robillard <d@drobilla.net>2022-01-28 21:57:07 -0500
commit385a612b3bab9c5b177d7a400b72cb7fe3e3a299 (patch)
treefde30cdeaf13c85a1a9d0873193a7625d8e8097b /src/writer.c
parent3ddbb5da6ac249638151a4570747500610b5c07c (diff)
downloadserd-385a612b3bab9c5b177d7a400b72cb7fe3e3a299.tar.gz
serd-385a612b3bab9c5b177d7a400b72cb7fe3e3a299.tar.bz2
serd-385a612b3bab9c5b177d7a400b72cb7fe3e3a299.zip
Preserve anonymous graph syntax in TriG
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/writer.c b/src/writer.c
index 968d1a9f..5f178a6f 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -884,7 +884,8 @@ write_blank(SerdWriter* const writer,
return write_sep(writer, flags, SEP_LIST_BEGIN);
}
- if (field == SERD_SUBJECT && (flags & SERD_EMPTY_S)) {
+ if ((field == SERD_SUBJECT && (flags & SERD_EMPTY_S)) ||
+ (field == SERD_GRAPH && (flags & SERD_EMPTY_G))) {
writer->last_sep = SEP_NONE; // Treat "[]" like a node
return esink("[]", 2, writer);
}