Sha256: 627cdfde534200088ee588a9fb47b8ce944ed3de3a5d1335f2f7fe251830239e
Contents?: true
Size: 388 Bytes
Versions: 4
Compression:
Stored size: 388 Bytes
Contents
require 'nokogiri' require 'nokogumboc' module Nokogiri def self.HTML5(string) Nokogiri::HTML5.parse(string) end module HTML5 def self.parse(string) # convert to UTF-8 (Ruby 1.9+) if string.respond_to?(:encoding) and string.encoding != Encoding::UTF_8 string = string.encode(Encoding::UTF_8) end Nokogumbo.parse(string) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
nokogumbo-0.5.2 | lib/nokogumbo.rb |
nokogumbo-0.5.1 | lib/nokogumbo.rb |
nokogumbo-0.5 | lib/nokogumbo.rb |
nokogumbo-0.4 | lib/nokogumbo.rb |