lib/jekyll/geolexica/glossary.rb in jekyll-geolexica-1.8.13 vs lib/jekyll/geolexica/glossary.rb in jekyll-geolexica-1.8.14

- old
+ new

@@ -81,17 +81,24 @@ def normalize_sources(concept) authoritative_sources = concept.delete('authoritativeSource') || [] concept['sources'] ||= [] authoritative_sources.each do |authoritative_source| + if authoritative_source['relationship'] + status = authoritative_source['relationship']['type'] + modification = authoritative_source['relationship']['modification'] + end + concept['sources'] << { + "status" => status, + "modification" => modification, "origin" => { 'ref' => authoritative_source['ref'], 'clause' => authoritative_source['clause'], 'link' => authoritative_source['link'], }.compact, 'type' => 'authoritative' - } + }.compact end end # Does nothing, but some sites may replace this method. def preprocess_concept_hash(concept_hash); end