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-17 09:51:53 +0300
committerConnor Shea <connor.james.shea@gmail.com>2016-11-17 09:51:53 +0300
commitcea5311af550fea5d041093f2000b968cfcb00c9 (patch)
treeccf22737572ce732413647fded9375d2aa98758e /Rules
parentef68d9247f0398801788b7b059d592f058c62f3c (diff)
Cleaner filename check.
Diffstat (limited to 'Rules')
-rw-r--r--Rules3
1 files changed, 1 insertions, 2 deletions
diff --git a/Rules b/Rules
index a2a45585..2f53507f 100644
--- a/Rules
+++ b/Rules
@@ -30,8 +30,7 @@ end
compile '/**/*.md' do
if item[:redirect].nil?
- include_toc = (item.identifier.to_s.split("/")[2] == "README.md" || item.identifier.to_s.split("/")[2] == "index.md") ? false : true
-
+ include_toc = item.identifier.to_s.split("/")[2].end_with?("README.md", "index.md") ? false : true
# Use Redcarpet with Rouge.
filter :redcarpet,
renderer: HTML,