From 63faea3d4c7f14d4c002bf4771375228641afa9d Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 25 Oct 2001 19:06:03 +0000 Subject: Fix mis-aimed `next' pointers in various sections; appears to have sorted out the HTML truncated-contents bug. [originally from svn r1327] --- bk_xhtml.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bk_xhtml.c') diff --git a/bk_xhtml.c b/bk_xhtml.c index 548495f..e4a25bf 100644 --- a/bk_xhtml.c +++ b/bk_xhtml.c @@ -392,7 +392,14 @@ static void xhtml_ponder_layout(paragraph *p) if (level>conf.leaf_level) { /* stick within the same file - link into currentsect */ assert(currentfile->is_leaf); sect->file = currentfile; + while (currentsect && currentsect->level > level && + currentsect->file==currentsect->parent->file) { + currentsect = currentsect->parent; + } + assert(currentsect); currentsect->next = sect; + assert(currentsect->level == sect->level); + sect->parent = currentsect->parent; currentsect = sect; /* printf("connected '%s' to existing file '%s' [II]\n", sect->fragment, currentfile->filename);*/ } else { /* going sideways ... */ -- cgit v1.1