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 17:12:42 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2018-12-07 17:12:42 +0300
commit6c70446545af15f2ac73e59ac26f9d2070174c20 (patch)
treee8501af8f3dc1090cd87733954fa3783579d8592 /Rules
parentab8e0d00efe7daf339c7a1bd1399881811d6526d (diff)
Check for .md instead of .html in the redirect_to item
Due to first checking if there wasn't an .html extension in the redirect_to item, this was not set if the provided URL was a clean URL. For example: --- redirect_to: 'https://design.gitlab.com' --- would never match one of the rules so as to set the redirect_to item.
Diffstat (limited to 'Rules')
-rw-r--r--Rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/Rules b/Rules
index c59e75ed..42c20996 100644
--- a/Rules
+++ b/Rules
@@ -18,7 +18,7 @@ preprocess do
end
else
# If the provided relative URL is in Markdown, correct it to HTML.
- unless item[:redirect_to].to_s.match(/.html$/)
+ if item[:redirect_to].to_s.match(/.md$/)
item[:redirect_to] = item[:redirect_to].gsub!(/\.md/, '.html')
end
end