diff options
author | Evan Read <eread@gitlab.com> | 2020-12-22 02:42:47 +0300 |
---|---|---|
committer | Evan Read <eread@gitlab.com> | 2020-12-22 02:42:47 +0300 |
commit | 36a0020a05042066ffc400b02c5c57167fd9ffcb (patch) | |
tree | 4dd639d59b739c8df5e34f28dfaa5d45ec771e5a /lib | |
parent | 42b205fb5487578dc3daa1cfcb6b46a5ef27a738 (diff) |
Fix several minor Rubocop issues
Diffstat (limited to 'lib')
-rw-r--r-- | lib/filters/markdown_to_html_ext.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/symlinks_converter.rb | 2 | ||||
-rw-r--r-- | lib/helpers/child_parent_better.rb | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/lib/filters/markdown_to_html_ext.rb b/lib/filters/markdown_to_html_ext.rb index 63e6707a5..b90dca042 100644 --- a/lib/filters/markdown_to_html_ext.rb +++ b/lib/filters/markdown_to_html_ext.rb @@ -9,6 +9,7 @@ module Nanoc::Filters if /^href="http/.match(result).nil? # Check if link is internal result.gsub!(/\.md/, '.html') # Replace the extension if link is internal end + result end end diff --git a/lib/gitlab/symlinks_converter.rb b/lib/gitlab/symlinks_converter.rb index 4354a4d37..d00893380 100644 --- a/lib/gitlab/symlinks_converter.rb +++ b/lib/gitlab/symlinks_converter.rb @@ -1,6 +1,6 @@ module Gitlab class SymlinksConverter - EXTENTIONS = ['png', 'jpg', 'gif', 'svg'] + EXTENTIONS = %w[png jpg gif svg].freeze def initialize(config, items) @config = config diff --git a/lib/helpers/child_parent_better.rb b/lib/helpers/child_parent_better.rb index 7c5f0fbb8..f4a647f32 100644 --- a/lib/helpers/child_parent_better.rb +++ b/lib/helpers/child_parent_better.rb @@ -5,6 +5,7 @@ module Nanoc::Helpers if @config[:debug] puts item end + parent_array = [] current_item = item # Until the current item has no parent, keep running. |