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
path: root/lib/rouge
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-06-30 14:20:15 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-07-08 12:04:04 +0300
commitc6f9a1c273beb7e427da1e384ed27e323d6f3b29 (patch)
tree9f2c94e7975c11870c2cca1bcfbe6d1dd169563a /lib/rouge
parent2c650b6f30d2e76cf632d6ce5771859aed67ac48 (diff)
Enable Style/IdenticalConditionalBranches Rubocop cop
Diffstat (limited to 'lib/rouge')
-rw-r--r--lib/rouge/formatters/html_gitlab.rb16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb
index 8c309efc7b8..3358ed6773e 100644
--- a/lib/rouge/formatters/html_gitlab.rb
+++ b/lib/rouge/formatters/html_gitlab.rb
@@ -143,18 +143,14 @@ module Rouge
'</span>'
end
end
- lines.join("\n")
- else
- if @linenos == 'inline'
- lines = lines.each_with_index.map do |line, index|
- number = index + @linenostart
- "<span class=\"linenos\">#{number}</span>#{line}"
- end
- lines.join("\n")
- else
- lines.join("\n")
+ elsif @linenos == 'inline'
+ lines = lines.each_with_index.map do |line, index|
+ number = index + @linenostart
+ "<span class=\"linenos\">#{number}</span>#{line}"
end
end
+
+ lines.join("\n")
end
def span(tok, val)