Files
news.gitea.happylizard.me/bin/gems/html-proofer-5.0.10/lib/html_proofer/utils.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

26 lines
459 B
Ruby

# frozen_string_literal: true
require "nokogiri"
module HTMLProofer
module Utils
def pluralize(count, single, plural)
"#{count} #{count == 1 ? single : plural}"
end
def blank?(obj)
obj.nil? || obj.empty?
end
def create_nokogiri(path)
content = if File.exist?(path) && !File.directory?(path)
File.read(path)
else
path
end
Nokogiri::HTML5(content, max_errors: -1)
end
end
end