aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-02-20 10:11:33 -0500
committerDavid Robillard <d@drobilla.net>2021-03-08 23:36:35 -0500
commitc579186c5dd4e11bffddd353cef8978a66ef9c10 (patch)
treeb89f1059d161872ded394a5c620a3b4f156f7972 /src/writer.c
parentc7a827b07898551611d43f92cf4e2fa53595957a (diff)
downloadserd-c579186c5dd4e11bffddd353cef8978a66ef9c10.tar.gz
serd-c579186c5dd4e11bffddd353cef8978a66ef9c10.tar.bz2
serd-c579186c5dd4e11bffddd353cef8978a66ef9c10.zip
WIP: Simplify node construction
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/writer.c b/src/writer.c
index d15320ae..566c6fde 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -694,8 +694,7 @@ write_literal(SerdWriter* writer,
}
SerdStatus st = SERD_SUCCESS;
- if (supports_abbrev(writer) &&
- (node->flags & (SERD_HAS_NEWLINE | SERD_HAS_QUOTE))) {
+ if (supports_abbrev(writer) && (node->flags & SERD_IS_LONG_LITERAL)) {
TRY(st, esink("\"\"\"", 3, writer));
TRY(st, write_text(writer, WRITE_LONG_STRING, node_str, node->n_bytes));
TRY(st, esink("\"\"\"", 3, writer));