Keep matching mainline as much as possible

This commit is contained in:
Mike Barnes 2024-10-09 14:00:25 +11:00
commit 4bc60b2b79
17 changed files with 3 additions and 128 deletions

View file

@ -302,11 +302,6 @@ class LinkDetailsExtractor
nil
end
def detect_encoding
guess = detector.detect(@html, @html_charset)
guess&.fetch(:confidence, 0).to_i > 60 ? guess&.fetch(:encoding, nil) : nil
end
def detector
@detector ||= CharlockHolmes::EncodingDetector.new.tap do |detector|
detector.strip_tags = true