Commit 5348ee62787a12855d8d917580fdcc8900910386
1 parent
7b50a7c9
Exists in
master
and in
4 other branches
Fix Ruby anti-pattern in Markdown
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
lib/gitlab/markdown.rb
... | ... | @@ -80,7 +80,7 @@ module Gitlab |
80 | 80 | # |
81 | 81 | # Returns parsed text |
82 | 82 | def parse(text) |
83 | - text = text.gsub(REFERENCE_PATTERN) do |match| | |
83 | + text.gsub!(REFERENCE_PATTERN) do |match| | |
84 | 84 | prefix = $1 || '' |
85 | 85 | reference = $2 |
86 | 86 | identifier = $3 || $4 || $5 |
... | ... | @@ -93,7 +93,7 @@ module Gitlab |
93 | 93 | end |
94 | 94 | end |
95 | 95 | |
96 | - text = text.gsub(EMOJI_PATTERN) do |match| | |
96 | + text.gsub!(EMOJI_PATTERN) do |match| | |
97 | 97 | if valid_emoji?($2) |
98 | 98 | image_tag("emoji/#{$2}.png", size: "20x20", class: 'emoji', title: $1, alt: $1) |
99 | 99 | else | ... | ... |