app/models/labeling/skos/base.rb in iqvoc-4.0.2 vs app/models/labeling/skos/base.rb in iqvoc-4.0.3

- old
+ new

@@ -81,10 +81,10 @@ 'partials/labeling/skos/search_result' end def self.build_from_rdf(subject, predicate, object) raise "Labeling::SKOS::Base#build_from_rdf: Subject (#{subject}) must be a Concept." unless subject.is_a?(Concept::Base) - raise "Labeling::SKOS::Base#build_from_rdf: Object (#{object}) must be a string literal" unless object =~ /^"(.+)"(@(.+))$/ + raise "Labeling::SKOS::Base#build_from_rdf: Object (#{object}) must be a string literal" unless object =~ /^"(.+)"(@(.+))?$/ lang = $3 value = JSON.parse(%Q{["#{$1}"]})[0].gsub("\\n", "\n") # Trick to decode \uHHHHH chars subject.send(self.name.to_relation_name) << self.new(:target => self.label_class.new(:value => value, :language => lang))