Skip to content

Commit 258ff52

Browse files
committed
Fix bug in vocabulary writer with %() strings.
1 parent 81f39cd commit 258ff52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/rdf/vocab/writer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def from_node(name, attributes, term_type)
263263

264264
def serialize_value(value, key, indent: "")
265265
if value.is_a?(Literal) && %w(: comment definition notation note editorialNote).include?(key.to_s)
266-
"%(#{value.to_s.gsub('(', '\(').gsub(')', '\)')}).freeze"
266+
"#{value.to_s.inspect}.freeze"
267267
elsif value.is_a?(RDF::URI)
268268
"#{value.pname.inspect}.freeze"
269269
elsif value.is_a?(RDF::Vocabulary::Term)

0 commit comments

Comments
 (0)