From 547b1e3938cd82d5324c6597fa24a492d8654a84 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sun, 20 Jun 2021 12:10:29 -0400 Subject: [PATCH] doc: note HTML5 is since v1.12.0 and not on JRuby see #2204 [skip ci] --- lib/nokogiri/html5.rb | 4 ++++ lib/nokogiri/html5/document.rb | 2 ++ lib/nokogiri/html5/document_fragment.rb | 2 ++ lib/nokogiri/html5/node.rb | 2 ++ 4 files changed, 10 insertions(+) diff --git a/lib/nokogiri/html5.rb b/lib/nokogiri/html5.rb index 306a29175e..5e994ce155 100644 --- a/lib/nokogiri/html5.rb +++ b/lib/nokogiri/html5.rb @@ -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 diff --git a/lib/nokogiri/html5/document.rb b/lib/nokogiri/html5/document.rb index 4fa49f2192..47bc078edc 100644 --- a/lib/nokogiri/html5/document.rb +++ b/lib/nokogiri/html5/document.rb @@ -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? diff --git a/lib/nokogiri/html5/document_fragment.rb b/lib/nokogiri/html5/document_fragment.rb index 574b16e3f7..88629b0ca5 100644 --- a/lib/nokogiri/html5/document_fragment.rb +++ b/lib/nokogiri/html5/document_fragment.rb @@ -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 diff --git a/lib/nokogiri/html5/node.rb b/lib/nokogiri/html5/node.rb index d1f76d68e7..ea36163c1a 100644 --- a/lib/nokogiri/html5/node.rb +++ b/lib/nokogiri/html5/node.rb @@ -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