Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-05-23 20:21:02 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-05-23 20:21:02 +0300
commit2de1109da39a46200e741b5a6643ce7fb1418041 (patch)
treebc1f2d8ff501f081fa1269cacfc88ebaf170693d /app/helpers/gitlab_markdown_helper.rb
parentbc806831e818b6e1ec2d1ae81221126f03c01f11 (diff)
Enable Performance/StartWith cop and fix offenses
Diffstat (limited to 'app/helpers/gitlab_markdown_helper.rb')
-rw-r--r--app/helpers/gitlab_markdown_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb
index 3a45205563e..0a1b48af219 100644
--- a/app/helpers/gitlab_markdown_helper.rb
+++ b/app/helpers/gitlab_markdown_helper.rb
@@ -13,7 +13,7 @@ module GitlabMarkdownHelper
def link_to_gfm(body, url, html_options = {})
return "" if body.blank?
- escaped_body = if body =~ /\A\<img/
+ escaped_body = if body.start_with?('<img')
body
else
escape_once(body)