From 2a78650ae3df3a17c9c33f07aea597eb5f36da61 Mon Sep 17 00:00:00 2001 From: Ed Ward Date: Fri, 24 Feb 2017 17:43:48 +0100 Subject: [PATCH] Bug on the breadcrumbs in build.py --- build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 = ''