diff options
author | David Robillard <d@drobilla.net> | 2025-04-11 12:17:07 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-04-11 12:17:07 -0400 |
commit | 8fd7442bf8dda8918a2ad606ffa2b9f85f622220 (patch) | |
tree | 730b0db006e6ba2f94add437196c32f8d7719485 /src | |
parent | 4b961f70c0874efcd73a36ac602e0da641030fda (diff) | |
download | serd-main.tar.gz serd-main.tar.bz2 serd-main.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/writer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/writer.c b/src/writer.c index 7e4a1060..aa7fd980 100644 --- a/src/writer.c +++ b/src/writer.c @@ -1212,7 +1212,12 @@ serd_writer_set_prefix(SerdWriter* const writer, TRY(st, serd_env_set_prefix(writer->env, name, uri)); if (writer->syntax == SERD_TURTLE || writer->syntax == SERD_TRIG) { + const bool had_subject = writer->context.subject.type; TRY(st, terminate_context(writer)); + if (had_subject) { + TRY(st, esink("\n", 1, writer)); + } + TRY(st, esink("@prefix ", 8, writer)); TRY(st, esink(name->buf, name->n_bytes, writer)); TRY(st, esink(": <", 3, writer)); |