Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,48 @@
# frozen_string_literal: true
module Nokogiri
module HTML4
###
# Nokogiri provides a SAX parser to process HTML4 which will provide HTML recovery
# ("autocorrection") features.
#
# See Nokogiri::HTML4::SAX::Parser for a basic example of using a SAX parser with HTML.
#
# For more information on SAX parsers, see Nokogiri::XML::SAX
#
module SAX
###
# This parser is a SAX style parser that reads its input as it deems necessary. The parser
# takes a Nokogiri::XML::SAX::Document, an optional encoding, then given an HTML input, sends
# messages to the Nokogiri::XML::SAX::Document.
#
# ⚠ This is an HTML4 parser and so may not support some HTML5 features and behaviors.
#
# Here is a basic usage example:
#
# class MyHandler < Nokogiri::XML::SAX::Document
# def start_element name, attributes = []
# puts "found a #{name}"
# end
# end
#
# parser = Nokogiri::HTML4::SAX::Parser.new(MyHandler.new)
#
# # Hand an IO object to the parser, which will read the HTML from the IO.
# File.open(path_to_html) do |f|
# parser.parse(f)
# end
#
# For more information on \SAX parsers, see Nokogiri::XML::SAX or the parent class
# Nokogiri::XML::SAX::Parser.
#
# Also see Nokogiri::XML::SAX::Document for the available events.
#
class Parser < Nokogiri::XML::SAX::Parser
# this class inherits its behavior from Nokogiri::XML::SAX::Parser, but note that superclass
# uses Nokogiri::ClassResolver to use HTML4::SAX::ParserContext as the context class for
# this class, which is where the real behavioral differences are implemented.
end
end
end
end
@@ -0,0 +1,15 @@
# frozen_string_literal: true
module Nokogiri
module HTML4
module SAX
###
# Context object to invoke the HTML4 SAX parser on the SAX::Document handler.
#
# 💡 This class is usually not instantiated by the user. Use Nokogiri::HTML4::SAX::Parser
# instead.
class ParserContext < Nokogiri::XML::SAX::ParserContext
end
end
end
end
@@ -0,0 +1,37 @@
# frozen_string_literal: true
module Nokogiri
module HTML4
module SAX
class PushParser
# The Nokogiri::HTML4::SAX::Document on which the PushParser will be
# operating
attr_accessor :document
def initialize(doc = HTML4::SAX::Document.new, file_name = nil, encoding = "UTF-8")
@document = doc
@encoding = encoding
@sax_parser = HTML4::SAX::Parser.new(doc, @encoding)
## Create our push parser context
initialize_native(@sax_parser, file_name, encoding)
end
###
# Write a +chunk+ of HTML to the PushParser. Any callback methods
# that can be called will be called immediately.
def write(chunk, last_chunk = false)
native_write(chunk, last_chunk)
end
alias_method :<<, :write
###
# Finish the parsing. This method is only necessary for
# Nokogiri::HTML4::SAX::Document#end_document to be called.
def finish
write("", true)
end
end
end
end
end