lib/json/ld/compact.rb in json-ld-3.1.8 vs lib/json/ld/compact.rb in json-ld-3.1.9
- old
+ new
@@ -98,11 +98,11 @@
log_debug("", depth: log_depth.to_i) {"#{expanded_property}: #{expanded_value.inspect}"}
if expanded_property == '@id'
compacted_value = as_array(expanded_value).map do |expanded_id|
if node?(expanded_id) && @options[:rdfstar]
- # This can only really happen for valid RDF*
+ # This can only really happen for valid RDF-star
compact(expanded_id, base: base,
property: '@id',
log_depth: log_depth.to_i + 1)
else
context.compact_iri(expanded_id, base: @options[:base])
@@ -143,10 +143,10 @@
compacted_value.delete(prop)
end
end
unless compacted_value.empty?
- al = context.compact_iri('@reverse')
+ al = context.compact_iri('@reverse', vocab: true)
log_debug("", depth: log_depth.to_i) {"remainder: #{al} => #{compacted_value.inspect}"}
result[al] = compacted_value
end
next
end