Skip to content

Instantly share code, notes, and snippets.

@dmitrinesterenko
Forked from jkeyes/html5test.rb
Created May 28, 2014 14:51
Show Gist options
  • Save dmitrinesterenko/48e85620342b0c2e0860 to your computer and use it in GitHub Desktop.
Save dmitrinesterenko/48e85620342b0c2e0860 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'nokogiri'
markup = <<-eom
<!DOCTYPE html>
<html>
<body>
<header>
<h1>HTML5</h1>
</header>
</body>
</html>
eom
html_doc = Nokogiri::HTML(markup) do |config|
config.strict
end
puts html_doc.errors
$ ruby noko.rb
Tag header invalid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment