diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2018-12-07 17:12:42 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-12-07 17:12:42 +0300 |
commit | 6c70446545af15f2ac73e59ac26f9d2070174c20 (patch) | |
tree | e8501af8f3dc1090cd87733954fa3783579d8592 /Rules | |
parent | ab8e0d00efe7daf339c7a1bd1399881811d6526d (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-- | Rules | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |