diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-30 14:20:15 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-07-08 12:04:04 +0300 |
commit | c6f9a1c273beb7e427da1e384ed27e323d6f3b29 (patch) | |
tree | 9f2c94e7975c11870c2cca1bcfbe6d1dd169563a /lib/rouge/formatters | |
parent | 2c650b6f30d2e76cf632d6ce5771859aed67ac48 (diff) |
Enable Style/IdenticalConditionalBranches Rubocop cop
Diffstat (limited to 'lib/rouge/formatters')
-rw-r--r-- | lib/rouge/formatters/html_gitlab.rb | 16 |
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) |