Commit b3bbf53e authored by Robert Speicher's avatar Robert Speicher

Set the size of emoji to be 20x20

Forgot they were so big!
parent 67a6a0b2
...@@ -95,7 +95,7 @@ module Gitlab ...@@ -95,7 +95,7 @@ module Gitlab
text = text.gsub(EMOJI_PATTERN) do |match| text = text.gsub(EMOJI_PATTERN) do |match|
if valid_emoji?($2) if valid_emoji?($2)
helper.image_tag("#{$2}.png", class: 'emoji', title: $1, alt: $1) helper.image_tag("#{$2}.png", size: "20x20", class: 'emoji', title: $1, alt: $1)
else else
match match
end end
......
...@@ -234,6 +234,12 @@ describe GitlabMarkdownHelper do ...@@ -234,6 +234,12 @@ describe GitlabMarkdownHelper do
gfm(":+1:").should match('class="emoji"') gfm(":+1:").should match('class="emoji"')
end end
it "sets height and width" do
actual = gfm(":+1:")
actual.should match(/width="20"/)
actual.should match(/height="20"/)
end
it "keeps whitespace intact" do it "keeps whitespace intact" do
gfm("This deserves a :+1: big time.").should match(/deserves a <img.+\/> big time/) gfm("This deserves a :+1: big time.").should match(/deserves a <img.+\/> big time/)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment