aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/serd/serd.h5
-rw-r--r--src/n3.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index a98b2b8a..b0892573 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -1566,8 +1566,9 @@ typedef struct SerdReaderImpl SerdReader;
/// Reader options
typedef enum {
- SERD_READ_LAX = 1u << 0u, ///< Tolerate invalid input where possible
- SERD_READ_VARIABLES = 1u << 1u ///< Support variable nodes
+ SERD_READ_LAX = 1u << 0u, ///< Tolerate invalid input where possible
+ SERD_READ_VARIABLES = 1u << 1u, ///< Support variable nodes
+ SERD_READ_EXACT_BLANKS = 1u << 2u, ///< Allow clashes with generated blanks
} SerdReaderFlag;
/// Bitwise OR of SerdReaderFlag values
diff --git a/src/n3.c b/src/n3.c
index 517dce8f..14f5aec1 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1090,7 +1090,7 @@ read_BLANK_NODE_LABEL(SerdReader* const reader,
*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