mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
DEV: add native lazy loading for emojis (#15830)
This commit is contained in:
@ -55,7 +55,7 @@ describe UserNotificationsHelper do
|
||||
end
|
||||
|
||||
it "doesn't count emoji images" do
|
||||
with_emoji = "<p>Hi <img src=\"/images/emoji/twitter/smile.png?v=#{Emoji::EMOJI_VERSION}\" title=\":smile:\" class=\"emoji\" alt=\":smile:\"></p>"
|
||||
with_emoji = "<p>Hi <img src=\"/images/emoji/twitter/smile.png?v=#{Emoji::EMOJI_VERSION}\" title=\":smile:\" class=\"emoji\" alt=\":smile:\" loading=\"lazy\" width=\"20\" height=\"20\"></p>"
|
||||
arg = ([with_emoji] + paragraphs).join("\n")
|
||||
SiteSetting.digest_min_excerpt_length = 50
|
||||
expect(helper.email_excerpt(arg)).to eq([with_emoji, paragraphs[0]].join)
|
||||
|
Reference in New Issue
Block a user