Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Amirault <mamirault@gitlab.com>2021-06-18 07:09:00 +0300
committerMarcel Amirault <4155490-marcel.amirault@users.noreply.gitlab.com>2021-06-22 17:43:08 +0300
commit2aa3dff3148187ead4a08c553660f8e721ac7ac8 (patch)
tree5ce96c808fe2bf115211047678701eea195dd845 /lib/checks
parentb27347aaedf00996d5b9fff2737f3b0810ffbfbe (diff)
Only test anchors in the anchor test
Diffstat (limited to 'lib/checks')
-rw-r--r--lib/checks/anchors.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/checks/anchors.rb b/lib/checks/anchors.rb
index 91238bfc..3c775f4f 100644
--- a/lib/checks/anchors.rb
+++ b/lib/checks/anchors.rb
@@ -5,14 +5,7 @@ Nanoc::Check.define(:internal_anchors) do
next unless link.to_anchor?
next if link.anchor_name == 'markdown-toc'
- if link.destination_page_not_found?
- add_issue <<~ERROR
- Destination page not found!
- - source file `#{link.source_file}`
- - destination `#{link.destination_file}`
- - link `#{link.href}`
- ERROR
- elsif link.destination_anchor_not_found?
+ if link.destination_anchor_not_found?
add_issue <<~ERROR
Broken anchor detected!
- source file `#{link.source_file}`