mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Spoiler logic should live inside of spoiler plugin
This commit removes logic about spoilers because it should live inside of the discourse-spoiler-alert plugin. This PR: https://github.com/discourse/discourse-spoiler-alert/pull/38 also completely removes spoilers from excerpts in order to keep them from leaking in topic previews and notifications.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user