Skip to content
Browse files

Fix `chapter_links` to be shown at '/guides/enumerables'

`chapter_links` wasn't rendered at `/guides/enumerables/`.
This cause is:
This section name is 'enumerables'.
But `chapter_links` would match it with 'enumerables/'.

So I fixed to match url to section slug.
  • Loading branch information...
1 parent 19b0608 commit 8c696e90344ca20f7e2c2437dc9e908b63485190 @tricknotes tricknotes committed May 5, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/toc.rb
3 lib/toc.rb
@@ -100,7 +100,8 @@ def current_section
section_prefix = section_slug + "/"
data.guides.find do |section, entries|
entries.find do |entry|
- entry.url.starts_with? section_prefix
+ url = entry.url
+ url.starts_with?(section_prefix) || url == section_slug

0 comments on commit 8c696e9

Please sign in to comment.
Something went wrong with that request. Please try again.