Skip to content

Commit

Permalink
Merge pull request #537 from JordanCheney/master
Browse files Browse the repository at this point in the history
Change to active status should recursively move up tree
  • Loading branch information
d0ugal committed May 20, 2015
2 parents c39d0d9 + 6b04586 commit 7d92fff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mkdocs/nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def indent_print(self, depth=0):
def set_active(self, active=True):
self.active = active
for ancestor in self.ancestors:
ancestor.active = active
ancestor.set_active(active)


class Header(object):
Expand All @@ -195,6 +195,11 @@ def indent_print(self, depth=0):
ret += item.indent_print(depth + 1)
return ret

def set_active(self, active=True):
self.active = active
for ancestor in self.ancestors:
ancestor.set_active(active)


def _path_to_page(path, title, url_context, use_directory_urls):
if title is None:
Expand Down

0 comments on commit 7d92fff

Please sign in to comment.