diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-07-04 17:02:01 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-07-09 16:13:08 +0300 |
commit | 3bfe30662436e48d4324b8fac5c1634df4a7cf7f (patch) | |
tree | 3f772a44196e249ded23b453b89799095cbcc5d8 /lib/gitlab/google_code_import | |
parent | 9286f5b9340f92131c320c231a5fb3e51c23bf04 (diff) |
Resolve Naming/UncommunicativeMethod
Diffstat (limited to 'lib/gitlab/google_code_import')
-rw-r--r-- | lib/gitlab/google_code_import/importer.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/gitlab/google_code_import/importer.rb b/lib/gitlab/google_code_import/importer.rb index 46b49128140..5070f4e3cfe 100644 --- a/lib/gitlab/google_code_import/importer.rb +++ b/lib/gitlab/google_code_import/importer.rb @@ -200,27 +200,27 @@ module Gitlab "Status: #{name}" end - def linkify_issues(s) - s = s.gsub(/([Ii]ssue) ([0-9]+)/, '\1 #\2') - s = s.gsub(/([Cc]omment) #([0-9]+)/, '\1 \2') - s + def linkify_issues(str) + str = str.gsub(/([Ii]ssue) ([0-9]+)/, '\1 #\2') + str = str.gsub(/([Cc]omment) #([0-9]+)/, '\1 \2') + str end - def escape_for_markdown(s) + def escape_for_markdown(str) # No headings and lists - s = s.gsub(/^#/, "\\#") - s = s.gsub(/^-/, "\\-") + str = str.gsub(/^#/, "\\#") + str = str.gsub(/^-/, "\\-") # No inline code - s = s.gsub("`", "\\`") + str = str.gsub("`", "\\`") # Carriage returns make me sad - s = s.delete("\r") + str = str.delete("\r") # Markdown ignores single newlines, but we need them as <br />. - s = s.gsub("\n", " \n") + str = str.gsub("\n", " \n") - s + str end def create_label(name) |