aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/writer.c b/src/writer.c
index 83ad6e20..5b896f94 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -305,11 +305,15 @@ write_text(SerdWriter* writer, TextContext ctx,
case '\n': len += sink("\\n", 2, writer); continue;
case '\r': len += sink("\\r", 2, writer); continue;
case '\t': len += sink("\\t", 2, writer); continue;
- case '\b': len += sink("\\b", 2, writer); continue;
- case '\f': len += sink("\\f", 2, writer); continue;
case '"': len += sink("\\\"", 2, writer); continue;
default: break;
}
+ if (writer->syntax != SERD_NTRIPLES) {
+ switch (in) {
+ case '\b': len += sink("\\b", 2, writer); continue;
+ case '\f': len += sink("\\f", 2, writer); continue;
+ }
+ }
}
size_t size = 0;