Commit b3bbf53e9bd0d3eb4b947f0e1f01887120e7a2fb

Authored by Robert Speicher
1 parent 67a6a0b2

Set the size of emoji to be 20x20

Forgot they were so big!
lib/gitlab/markdown.rb
... ... @@ -95,7 +95,7 @@ module Gitlab
95 95  
96 96 text = text.gsub(EMOJI_PATTERN) do |match|
97 97 if valid_emoji?($2)
98   - helper.image_tag("#{$2}.png", class: 'emoji', title: $1, alt: $1)
  98 + helper.image_tag("#{$2}.png", size: "20x20", class: 'emoji', title: $1, alt: $1)
99 99 else
100 100 match
101 101 end
... ...
spec/helpers/gitlab_markdown_helper_spec.rb
... ... @@ -234,6 +234,12 @@ describe GitlabMarkdownHelper do
234 234 gfm(":+1:").should match('class="emoji"')
235 235 end
236 236  
  237 + it "sets height and width" do
  238 + actual = gfm(":+1:")
  239 + actual.should match(/width="20"/)
  240 + actual.should match(/height="20"/)
  241 + end
  242 +
237 243 it "keeps whitespace intact" do
238 244 gfm("This deserves a :+1: big time.").should match(/deserves a <img.+\/> big time/)
239 245 end
... ...