diff options
-rw-r--r-- | serd/serd.h | 5 | ||||
-rw-r--r-- | src/n3.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/serd/serd.h b/serd/serd.h index 612d2438..bac74adc 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -265,8 +265,9 @@ typedef struct { /// Reader options typedef enum { - SERD_READ_LAX = 1 << 0, ///< Tolerate invalid input where possible - SERD_READ_VARIABLES = 1 << 1 ///< Support variable nodes + SERD_READ_LAX = 1 << 0, ///< Tolerate invalid input where possible + SERD_READ_VARIABLES = 1 << 1, ///< Support variable nodes + SERD_READ_EXACT_BLANKS = 1 << 2, ///< Allow clashes with generated blanks } SerdReaderFlag; /// Bitwise OR of SerdReaderFlag values @@ -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 |