From 5348ee62787a12855d8d917580fdcc8900910386 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Fri, 7 Sep 2012 22:14:17 +0200 Subject: [PATCH] Fix Ruby anti-pattern in Markdown --- lib/gitlab/markdown.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gitlab/markdown.rb b/lib/gitlab/markdown.rb index 17f865bba70..afb61364b1f 100644 --- a/lib/gitlab/markdown.rb +++ b/lib/gitlab/markdown.rb @@ -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