Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use argument forwarding in HTML4 module #3330

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions lib/nokogiri/html4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@

module Nokogiri
class << self
# :call-seq:
# HTML4(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block) → Nokogiri::HTML4::Document
#
# Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse
def HTML4(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block)
Nokogiri::HTML4::Document.parse(input, url, encoding, options, &block)
def HTML4(...)
Nokogiri::HTML4::Document.parse(...)
end
end

Expand All @@ -20,14 +17,14 @@ module HTML4
class << self
###
# Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse
def parse(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block)
Document.parse(input, url, encoding, options, &block)
def parse(...)
Document.parse(...)
end

####
# Parse a fragment from +string+ in to a NodeSet.
def fragment(string, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block)
HTML4::DocumentFragment.parse(string, encoding, options, &block)
def fragment(...)
HTML4::DocumentFragment.parse(...)
end
end

Expand Down