diff --git a/lib/excerpt_parser.rb b/lib/excerpt_parser.rb
index 24fc89792f..4a2f483f36 100644
--- a/lib/excerpt_parser.rb
+++ b/lib/excerpt_parser.rb
@@ -123,11 +123,6 @@ class ExcerptParser < Nokogiri::XML::SAX::Document
@current_length = 0
@start_excerpt = true
end
- # Preserve spoilers
- if attributes.include?(["class", "spoiler"])
- include_tag("span", attributes)
- @in_spoiler = true
- end
when "details"
@detail_contents = +"" if @in_details_depth == 0
diff --git a/spec/components/pretty_text_spec.rb b/spec/components/pretty_text_spec.rb
index 11da34414c..1a9118d08c 100644
--- a/spec/components/pretty_text_spec.rb
+++ b/spec/components/pretty_text_spec.rb
@@ -589,11 +589,6 @@ describe PrettyText do
expect(PrettyText.excerpt("
", 100, markdown_images: true)).to eq("")
end
- it "should keep spoilers" do
- expect(PrettyText.excerpt("

hello