mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 12:45:24 +08:00
Revert "FIX: strip spoilers in notification excerpts"
This reverts commit 55942224ed9d3329113e0060b7726bb53f648433.
This commit is contained in:
@ -32,14 +32,4 @@ describe ExcerptParser do
|
||||
expect(ExcerptParser.get_excerpt(html, 3, {})).to match_html('<details class="disabled"><summary>foo</summary></details>')
|
||||
expect(ExcerptParser.get_excerpt(html, 2, {})).to match_html('<details class="disabled"><summary>fo…</summary></details>')
|
||||
end
|
||||
|
||||
it "preserves spoilers by default" do
|
||||
html = 'Foo <span class="spoiler">bar</span>'
|
||||
expect(ExcerptParser.get_excerpt(html, 100, {})).to match_html('Foo <span class="spoiler">bar</span>')
|
||||
end
|
||||
|
||||
it "strips spoilers when specified" do
|
||||
html = 'Foo <span class="spoiler">bar</span>'
|
||||
expect(ExcerptParser.get_excerpt(html, 100, strip_spoilers: true)).to match_html("Foo [#{I18n.t 'excerpt_spoiler'}]")
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user