Skip to content

Commit

Permalink
Finish 3.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Jul 9, 2020
2 parents 0221db8 + 509f29b commit 0c86e8e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
3.1.1
3.1.2
6 changes: 4 additions & 2 deletions lib/rdf/rdfa/reader/nokogiri.rb
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion spec/suite_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 0c86e8e

Please sign in to comment.