Skip to content

Commit

Permalink
Some nokogiri-dependent code works for Ruby >= 2.7.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed May 3, 2023
1 parent 7c5f8f2 commit 5ea34be
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion lib/rdf/microdata/rdfa_reader.rb
Expand Up @@ -97,7 +97,6 @@ def initialize(input = $stdin, **options, &block)
# Add @vocab to referenced using the closest ansestor having @vocab of item.
# If the element with id reference has no resource attribute, add a resource attribute whose value is a NUMBER SIGN U+0023 followed by reference to the element.
# If the element with id reference has no typeof attribute, add a typeof="rdfa:Pattern" attribute to the element.
# FIXME: This broke in Nokogiri 13.0
referenced.wrap(%(<div vocab="#{item_vocab}" resource="##{ref}" typeof="rdfa:Pattern" />))

# Add a link child element to the element that represents the item, with a rel="rdfa:copy" attribute and an href attribute whose value is a NUMBER SIGN U+0023 followed by reference
Expand Down
1 change: 1 addition & 0 deletions spec/rdfa_reader_spec.rb
Expand Up @@ -630,6 +630,7 @@
],
}.each do |name, (md, nt)|
it "parses #{name}" do
pending "Broke in Nokogiri 13.0" if RUBY_VERSION < "2.7"
expect(parse(md)).to be_equivalent_graph(nt, logger: @logger)
end
end
Expand Down

0 comments on commit 5ea34be

Please sign in to comment.