From 20e2f827282213714174e52ce7684e315545176c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 10 Oct 2020 12:31:29 +0200 Subject: Add SERD_READ_EXACT_BLANKS flags This allows suppressing the blank node ID clashing mechanism to read blank IDs exactly as they appear in the input, even if they match the scheme used to generate blank node IDs internally. --- src/n3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/n3.c b/src/n3.c index c521b239..1b1497a6 100644 --- a/src/n3.c +++ b/src/n3.c @@ -983,7 +983,7 @@ read_BLANK_NODE_LABEL(SerdReader* reader, SerdNode** dest, bool* ate_dot) *ate_dot = true; } - if (fancy_syntax(reader)) { + if (fancy_syntax(reader) && !(reader->flags & SERD_READ_EXACT_BLANKS)) { if (is_digit(buf[reader->bprefix_len + 1])) { if ((buf[reader->bprefix_len]) == 'b') { buf[reader->bprefix_len] = 'B'; // Prevent clash -- cgit v1.2.1