diff options
author | Connor Shea <connor.james.shea@gmail.com> | 2016-11-10 01:12:19 +0300 |
---|---|---|
committer | Connor Shea <connor.james.shea@gmail.com> | 2016-11-10 01:12:19 +0300 |
commit | 770efdd6db8ebd2f128ff615c53b107f8c72f516 (patch) | |
tree | f9b15bb4fbfca0de9c8a41fc6c2402ca940c158b /Rules | |
parent | e2155c99971f69b1557ee659b0cc7a2b6dee16bb (diff) |
Encoding bug fixed!
Diffstat (limited to 'Rules')
-rw-r--r-- | Rules | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |