diff --git a/VERSION b/VERSION index 94ff29c..ef538c2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.1 +3.1.2 diff --git a/lib/rdf/rdfa/reader/nokogiri.rb b/lib/rdf/rdfa/reader/nokogiri.rb index e62b1a4..353a8a8 100644 --- a/lib/rdf/rdfa/reader/nokogiri.rb +++ b/lib/rdf/rdfa/reader/nokogiri.rb @@ -34,7 +34,7 @@ def initialize(node, parent = nil) # # @return [String] def language - language = case + case when @node.attribute_with_ns("lang", RDF::XML.to_s) @node.attribute_with_ns("lang", RDF::XML.to_s) when @node.attribute("xml:lang") @@ -286,7 +286,9 @@ def doc_errors # FIXME: Nokogiri version 1.5 thinks many HTML5 elements are invalid, so just ignore all Tag errors. # Nokogumbo might make this simpler if @host_language == :html5 - @doc.errors.reject {|e| e.to_s =~ /The doctype must be the first token in the document/} + @doc.errors.reject do |e| + e.to_s =~ %r{(The doctype must be the first token in the document)|(Expected a doctype token)|(Unexpected '\?' where start tag name is expected)} + end else @doc.errors.reject {|e| e.to_s =~ /(?:Tag \w+ invalid)|(?:Missing attribute name)/} end diff --git a/spec/suite_spec.rb b/spec/suite_spec.rb index a7dde27..edaf103 100644 --- a/spec/suite_spec.rb +++ b/spec/suite_spec.rb @@ -14,7 +14,6 @@ Fixtures::TestCase.for_specific(host_language, version, Fixtures::TestCase::Test.send(classification)) do |t| specify "test #{t.num}: #{t.description}#{", (negative test)" if t.expectedResults.false?}" do skip "CDN messes up email addresses" if %w(0065 0176).include?(t.num) - pending "Nokogumbo error" if t.num == "0216" && host_language == "xhtml5" skip "XMLLiteral" if %w(0198 0212).include?(t.num) begin t.logger = RDF::Spec.logger