Skip to content

Commit

Permalink
doc: note HTML5 is since v1.12.0 and not on JRuby
Browse files Browse the repository at this point in the history
see #2204

[skip ci]
  • Loading branch information
flavorjones committed Jun 20, 2021
1 parent de16fd1 commit 547b1e3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/nokogiri/html5.rb
Expand Up @@ -20,11 +20,15 @@
require_relative 'html5/node'

module Nokogiri
# @since v1.12.0
# @note HTML5 functionality is not available when running JRuby.
# Parse an HTML 5 document. Convenience method for Nokogiri::HTML5::Document.parse
def self.HTML5(string_or_io, url = nil, encoding = nil, **options, &block)
Nokogiri::HTML5::Document.parse(string_or_io, url, encoding, **options, &block)
end

# @since v1.12.0
# @note HTML5 functionality is not available when running JRuby.
module HTML5
# HTML uses the XHTML namespace.
HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'.freeze
Expand Down
2 changes: 2 additions & 0 deletions lib/nokogiri/html5/document.rb
Expand Up @@ -17,6 +17,8 @@

module Nokogiri
module HTML5
# @since v1.12.0
# @note HTML5 functionality is not available when running JRuby.
class Document < Nokogiri::HTML::Document
def self.parse(string_or_io, url = nil, encoding = nil, **options, &block)
yield options if block_given?
Expand Down
2 changes: 2 additions & 0 deletions lib/nokogiri/html5/document_fragment.rb
Expand Up @@ -19,6 +19,8 @@

module Nokogiri
module HTML5
# @since v1.12.0
# @note HTML5 functionality is not available when running JRuby.
class DocumentFragment < Nokogiri::HTML::DocumentFragment
attr_accessor :document
attr_accessor :errors
Expand Down
2 changes: 2 additions & 0 deletions lib/nokogiri/html5/node.rb
Expand Up @@ -19,6 +19,8 @@

module Nokogiri
module HTML5
# @since v1.12.0
# @note HTML5 functionality is not available when running JRuby.
module Node
# HTML elements can have attributes that contain colons.
# Nokogiri::XML::Node#[]= treats names with colons as a prefixed QName
Expand Down

0 comments on commit 547b1e3

Please sign in to comment.