jsonld.js icon indicating copy to clipboard operation
jsonld.js copied to clipboard

fixed the regex for bnodes when parsing n-quads.

Open Jimflip opened this issue 9 years ago • 5 comments

Actually only a partial fix to support '_' in the bnode label as per specification:

http://www.w3.org/TR/n-quads/#BNodes

The characters _ and digits may appear anywhere in a blank node label.

This causes issues on rdflib also which is utilising jsonld.js for json-ld serialisation.

Jimflip avatar Dec 06 '16 12:12 Jimflip

So the test doesn't build consistently before this PR. So master is effectively broken?

Jimflip avatar Dec 06 '16 15:12 Jimflip

@Jimflip,

So the test doesn't build consistently before this PR. So master is effectively broken?

Some new framing tests were added recently due to some changes to the framing algorithm in the specification. We need to disable those for now so the tests pass again -- and then update our framing algorithm (when we have time) so they all pass. That's probably what you're seeing.

dlongley avatar Dec 06 '16 17:12 dlongley

This is probably also what we're seeing in #156.

harlantwood avatar Dec 06 '16 19:12 harlantwood

Just noticed this is still open, and no idea of how things have progressed since.

Shall I close this PR or have a crack at resolving conflicts?

Jimflip avatar May 25 '18 07:05 Jimflip

@Jimflip,

The RDF parser has moved over to rdf-canonize (and really should move into its own separate module, but that's for another day). You'd need to file a PR there against this line it looks like:

https://github.com/digitalbazaar/rdf-canonize/blob/master/lib/NQuads.js#L17

dlongley avatar May 25 '18 14:05 dlongley