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
path: root/Rules
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2018-12-07 18:29:17 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2018-12-07 18:29:17 +0300
commit68790116783aff9d6c55eb52df6c6a35f4368ffd (patch)
tree5611df61182672c0f9518f8da2fb1fc5c638a339 /Rules
parent84f6ba6f041f15f79425fd90883c695a42b08446 (diff)
Make sure we pick up URLs pointing to anchor links
Remove the strict regex ending in .md, since redirect URLs can also point to an anchor link.
Diffstat (limited to 'Rules')
-rw-r--r--Rules4
1 files changed, 1 insertions, 3 deletions
diff --git a/Rules b/Rules
index 286454b4..93d6423d 100644
--- a/Rules
+++ b/Rules
@@ -21,9 +21,7 @@ preprocess do
# Capture the intended page so the redirect page can redirect to it.
item[:redirect_to] = item.raw_content.match(/^This document was moved to \[.*\]\((.*)\)/m)[1]
# If the provided URL is in Markdown, correct it to HTML.
- if item[:redirect_to].to_s.match(/.md$/)
- item[:redirect_to] = item[:redirect_to].gsub!(/\.md/, '.html')
- end
+ item[:redirect_to] = item[:redirect_to].gsub!(/\.md/, '.html') if item[:redirect_to].to_s.match(/.md/)
end
end