diff options
author | Iwan Aucamp <aucampia@gmail.com> | 2022-08-24 20:59:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 20:59:21 +0200 |
commit | 8a58ae80214b413cbf950cb23820b09442d8f682 (patch) | |
tree | a6e1a4cb879e4654c39e8a13b3b2d317cb184b6b /.editorconfig | |
parent | 04bf7747aafd31636b4d7297283848aba8d719fe (diff) | |
download | rdflib-8a58ae80214b413cbf950cb23820b09442d8f682.tar.gz |
fix: issue with trig reference counting across graphs (#2085)
The TriG serializer was only considering BNode references inside a single
graph and not counting the BNodes subjects as references when considering if a
BNode should be serialized as unlabeled blank nodes (i.e. `[ ]`), and as a
result it was serializing BNodes as unlabeled if they were in fact referencing
BNodes in other graphs.
One caveat of this change is that some RDF Datasets may be serialized
less succinctly in that unlabeled blank nodes would not be used nodes where it is
technically possible to use them. This can be trivially fixed, but a trivial fix
increases the computational complexity of serialization significantly.
Other changes:
- Removed the roundtrip xfail that this change fixed.
- Added another roundtrip test which has various combinations of BNode
references across graphs in a dataset, this test fails for JSON-LD
however, so while this change removes one xfail it also now adds
another.
- Set the default indent_size and style in `.editorconfig` as to avoid
relying on undefined system defaults.
Diffstat (limited to '.editorconfig')
-rw-r--r-- | .editorconfig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig index a044bc5c..96bd27ac 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,6 +6,8 @@ root = true # Unix-style newlines with a newline ending every file [*] +indent_size = 4 +indent_style = space end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true |