diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2018-12-07 18:29:17 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-12-07 18:29:17 +0300 |
commit | 68790116783aff9d6c55eb52df6c6a35f4368ffd (patch) | |
tree | 5611df61182672c0f9518f8da2fb1fc5c638a339 /Rules | |
parent | 84f6ba6f041f15f79425fd90883c695a42b08446 (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-- | Rules | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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 |