lib/micro_micro/document.rb in micromicro-3.1.0 vs lib/micro_micro/document.rb in micromicro-4.0.0
- old
+ new
@@ -14,11 +14,11 @@
# doc = MicroMicro::Document.new(markup, url)
#
# @param markup [String] The HTML to parse for microformats2-encoded data.
# @param base_url [String] The URL associated with markup. Used for relative URL resolution.
def initialize(markup, base_url)
- @document = Nokogiri::HTML(markup, base_url).resolve_relative_urls!
+ @document = Nokogiri::HTML5::Document.parse(markup, base_url).resolve_relative_urls!
end
# @return [String]
#
# :nocov:
@@ -61,9 +61,9 @@
}
end
private
- # @return [Nokogiri::HTML::Document]
+ # @return [Nokogiri::HTML5::Document]
attr_reader :document
end
end