diff --git a/build.py b/build.py index 127f43f..6109782 100755 --- a/build.py +++ b/build.py @@ -195,7 +195,7 @@ def GetParent(fs, pos): thisLevel = fs[pos]['level'] pos = pos - 1 - while fs[pos]['level'] >= thisLevel and pos > 0: + while pos >= 0 and fs[pos]['level'] >= thisLevel: pos = pos - 1 return pos @@ -206,9 +206,9 @@ def GetParent(fs, pos): def GetBreadCrumbs(fs, pos): breadcrumbs = ' >
  • '+ fs[pos]['title'] + '
  • ' # The > is for Bootstrap pre-3.0 - while pos: + while pos >= 0: pos = GetParent(fs,pos) - if pos: + if pos >= 0: breadcrumbs=' >
  • '+ fs[pos]['title'] + '
  • '+ breadcrumbs breadcrumbs = ''