DEV: improve comment (#18041)

improves comment about caught exception to match implementation
This commit is contained in:
Sam 2022-08-23 15:14:24 +10:00 committed by GitHub
parent df04462475
commit 60685e6984
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,9 @@ module RetrieveTitle
begin
doc = Nokogiri::HTML5(html, nil, encoding)
rescue ArgumentError
# invalid HTML (too many attributes) - ignore
# invalid HTML (Eg: too many attributes, status tree too deep) - ignore
# Error in nokogumbo is not specialized, uses generic ArgumentError
# see: https://www.rubydoc.info/gems/nokogiri/Nokogiri/HTML5#label-Error+reporting
end
if doc