json_ld: fix compact-0014 and compact-0052

by fixing yet another spec bug
This commit is contained in:
Marcel Otto 2017-03-26 03:02:26 +02:00
parent 4fed971360
commit 913ae1be6c

View file

@ -16,7 +16,8 @@ defmodule JSON.LD.Compaction do
[] ->
%{}
result when is_list(result) ->
%{compact_iri("@graph", active_context, inverse_context) => result}
# TODO: Spec fixme? We're setting vocab to true, as other implementations do it, but this is not mentioned in the spec
%{compact_iri("@graph", active_context, inverse_context, nil, true) => result}
result ->
result
end