DEV: Remove dead code

There's no such thing as `@in_spoiler` anymore.
This commit is contained in:
Jarek Radosz 2021-05-27 11:09:46 +02:00 committed by Alan Guo Xiang Tan
parent 002c676344
commit bbcd70e8b5

View File

@ -1,7 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
class ExcerptParser < Nokogiri::XML::SAX::Document class ExcerptParser < Nokogiri::XML::SAX::Document
attr_reader :excerpt attr_reader :excerpt
CUSTOM_EXCERPT_REGEX = /<\s*(span|div)[^>]*class\s*=\s*['"]excerpt['"][^>]*>/ CUSTOM_EXCERPT_REGEX = /<\s*(span|div)[^>]*class\s*=\s*['"]excerpt['"][^>]*>/
@ -179,8 +178,6 @@ class ExcerptParser < Nokogiri::XML::SAX::Document
@in_summary = false if @in_details_depth == 1 @in_summary = false if @in_details_depth == 1
when "div", "span" when "div", "span"
throw :done if @start_excerpt throw :done if @start_excerpt
characters("</span>", truncate: false, count_it: false, encode: false) if @in_spoiler
@in_spoiler = false
end end
end end