diff options
author | Evan Read <eread@gitlab.com> | 2022-11-01 06:59:12 +0300 |
---|---|---|
committer | Evan Read <eread@gitlab.com> | 2022-11-01 06:59:40 +0300 |
commit | b0d5c1fe2ec12365faeff0ac8c30f3815fd8ce47 (patch) | |
tree | bba9742eec637a33fb6fc905b9a2f811a6f5b110 /lib | |
parent | 9569a941cc1b69b4ebf90e7920b6ffacfc25319d (diff) |
Clear RuboCop violations on anchors.rb
Diffstat (limited to 'lib')
-rw-r--r-- | lib/checks/anchors.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/checks/anchors.rb b/lib/checks/anchors.rb index e93fd9a2..cfbbc980 100644 --- a/lib/checks/anchors.rb +++ b/lib/checks/anchors.rb @@ -1,11 +1,12 @@ # frozen_string_literal: true Nanoc::Check.define(:internal_anchors) do + excluded_anchors = %w[markdown-toc offline-archives] output_html_filenames.each do |file| Gitlab::Docs::Page.new(file).links.each do |link| next unless link.internal? next unless link.to_anchor? - next if %w(markdown-toc, offline-archives).include? link.anchor_name + next if excluded_anchors.include? link.anchor_name next unless link.destination_anchor_not_found? |