aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-07-22 15:26:22 -0400
committerDavid Robillard <d@drobilla.net>2022-01-14 19:37:51 -0500
commitca3a7049506cd1ba91326a36fc02a7319657728c (patch)
tree7289c877d9dc6286ab1826fab45e8a1612e8bc20 /src/writer.c
parent21f17ad27b3e805003e50b0f5fcbe606bfef0f3b (diff)
downloadserd-ca3a7049506cd1ba91326a36fc02a7319657728c.tar.gz
serd-ca3a7049506cd1ba91326a36fc02a7319657728c.tar.bz2
serd-ca3a7049506cd1ba91326a36fc02a7319657728c.zip
Preserve long or short quoting from input documents
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 c6a91d78..5416d144 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -737,8 +737,7 @@ write_literal(SerdWriter* const 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)) {
TRY(st, esink("\"\"\"", 3, writer));
TRY(st, write_text(writer, WRITE_LONG_STRING, node_str, node->length));
TRY(st, esink("\"\"\"", 3, writer));