Revert "FIX: strip spoilers in notification excerpts"

This reverts commit 55942224ed9d3329113e0060b7726bb53f648433.
This commit is contained in:
Penar Musaraj
2019-04-15 10:15:17 -04:00
parent 989325ea7c
commit 24fd710f04
4 changed files with 3 additions and 21 deletions

View File

@ -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&hellip;</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