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:
authorConnor Shea <connor.james.shea@gmail.com>2016-11-10 01:12:19 +0300
committerConnor Shea <connor.james.shea@gmail.com>2016-11-10 01:12:19 +0300
commit770efdd6db8ebd2f128ff615c53b107f8c72f516 (patch)
treef9b15bb4fbfca0de9c8a41fc6c2402ca940c158b /Rules
parente2155c99971f69b1557ee659b0cc7a2b6dee16bb (diff)
Encoding bug fixed!
Diffstat (limited to 'Rules')
-rw-r--r--Rules4
1 files changed, 2 insertions, 2 deletions
diff --git a/Rules b/Rules
index db669da4..b1d72b29 100644
--- a/Rules
+++ b/Rules
@@ -5,14 +5,14 @@ preprocess do
if item.identifier.to_s.end_with?(".md") && !item.binary?
begin
# If the page is a redirect, make it a redirect.
- if item.raw_content =~ /^This document was moved to \[.*\]\(.*\)/m
+ if item.raw_content =~ /^This document was moved to \[.*\]\(.*\)/mu
# Capture the intended page so the redirect page can redirect to it.
item[:redirect] = item.raw_content.match(/^This document was moved to \[.*\]\((.*)\)/m)[1]
# Correct the URL.
item[:redirect] = item[:redirect].gsub!(/\.md/, '.html')
end
- title = item.raw_content.match(/^[#] .*$/s).to_s
+ title = item.raw_content.match(/^[#] .*$/su).to_s
title.gsub!('# ', '')
item[:title] = title unless title.empty?
# Encoding errors happen on some files for some reason, so we