Fix Ruby anti-pattern in Markdown

This commit is contained in:
Riyad Preukschas 2012-09-07 22:14:17 +02:00
parent 7b50a7c99d
commit 5348ee6278

View file

@ -80,7 +80,7 @@ module Gitlab
#
# Returns parsed text
def parse(text)
text = text.gsub(REFERENCE_PATTERN) do |match|
text.gsub!(REFERENCE_PATTERN) do |match|
prefix = $1 || ''
reference = $2
identifier = $3 || $4 || $5
@ -93,7 +93,7 @@ module Gitlab
end
end
text = text.gsub(EMOJI_PATTERN) do |match|
text.gsub!(EMOJI_PATTERN) do |match|
if valid_emoji?($2)
image_tag("emoji/#{$2}.png", size: "20x20", class: 'emoji', title: $1, alt: $1)
else