From abdc6352e41264991c879194e1db9fd7d5db84ad Mon Sep 17 00:00:00 2001 From: Vasilii Iakliushin Date: Wed, 19 Aug 2020 14:24:25 +0200 Subject: Remove product suffix exception from internal_links checker Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/218764 Follow-up for: https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/1070 After merging: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39715 --- lib/gitlab/docs/link.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/gitlab/docs/link.rb b/lib/gitlab/docs/link.rb index 887ba102f..df19de2a3 100644 --- a/lib/gitlab/docs/link.rb +++ b/lib/gitlab/docs/link.rb @@ -1,8 +1,6 @@ module Gitlab module Docs class Link - PRODUCT_SUFFIX = /-(core|starter|premium|ultimate)(-only)?/.freeze - attr_reader :link, :href, :page def initialize(link, page) @@ -65,10 +63,7 @@ module Gitlab end def destination_anchor_not_found? - # TODO: Remove me when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39715 is merged - anchor_without_suffix = anchor_name.gsub(PRODUCT_SUFFIX, '') - - !destination_page.has_anchor?(anchor_without_suffix) + !destination_page.has_anchor?(anchor_name) end end end -- cgit v1.2.3