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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-10-19 15:57:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-19 15:57:54 +0300
commit419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch)
tree1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /haml_lint/linter/documentation_links.rb
parent1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff)
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'haml_lint/linter/documentation_links.rb')
-rw-r--r--haml_lint/linter/documentation_links.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/haml_lint/linter/documentation_links.rb b/haml_lint/linter/documentation_links.rb
index 3c99c295e2d..9fff207a81c 100644
--- a/haml_lint/linter/documentation_links.rb
+++ b/haml_lint/linter/documentation_links.rb
@@ -47,7 +47,9 @@ module HamlLint
def validate_node(node, match)
return if match.empty?
- path_to_file = detect_path_to_file(match[:link])
+ link = match[:link]
+
+ path_to_file = detect_path_to_file(link)
unless File.file?(path_to_file)
record_lint(node, "help_page_path points to the unknown location: #{path_to_file}")
@@ -57,6 +59,8 @@ module HamlLint
unless correct_anchor?(path_to_file, match[:anchor])
record_lint(node, "anchor (#{match[:anchor]}) is missing in: #{path_to_file}")
end
+
+ record_lint(node, "remove .md extension from the link: #{link}") if link.end_with?('.md')
end
def extract_link_and_anchor(ast_tree)