Skip to content

Commit df5303b

Browse files
committed
Be more tollerant of context load failures if the context URI starts with http://schema.org
1 parent 4536d95 commit df5303b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/json/ld/context.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def parse(local_context, remote_contexts = [])
274274
raise
275275
rescue Exception => e
276276
# Speical case for schema.org, until they get their act together
277-
if context.to_s == 'http://schema.org/'
277+
if context.to_s.start_with?('http://schema.org')
278278
RDF::Util::File.open_file("http://json-ld.org/contexts/schema.org.jsonld") do |f|
279279
context = JSON.parse(f.read)['@context']
280280
if @options[:processingMode] == "json-ld-1.0"

0 commit comments

Comments
 (0)