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-10-27 10:19:40 +0300
committerConnor Shea <connor.james.shea@gmail.com>2016-10-27 10:19:40 +0300
commit842318016d6d80d7f2ec600db24410bcdda47603 (patch)
tree878238de1a053673954379322e4e7a6e176335cb /Rules
parent80c3b95d946be63bea227e5540cdf92783d6c16c (diff)
Handle a situation where no header exists.
Diffstat (limited to 'Rules')
-rw-r--r--Rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/Rules b/Rules
index add701a8..4cd78c89 100644
--- a/Rules
+++ b/Rules
@@ -6,7 +6,7 @@ preprocess do
begin
title = item.raw_content.match(/^[#] .*$/s).to_s
title.gsub!('# ', '')
- item[:title] = title
+ item[:title] = title unless title.empty?
# Encoding errors happen on some files for some reason, so we
# rescue them.
rescue Encoding::CompatibilityError