Closed pietroppeter closed 1 year ago
Fascinating, I didn't even notice.
I did fix a bug on this kind of stuff some time ago (evidently did not squash completely the bug) so I kind of look for this stuff ;)
and this the bug I was referring to, likely the bug is in the same part of code: https://github.com/pietroppeter/nimibook/commit/428e482ac7b86e4f12c5ca8c79e419cb47250ea7
for sure not giving a look now at this, so if someone is dying to pick it up... 😝
and this the bug I was referring to, likely the bug is in the same part of code: https://github.com/pietroppeter/nimibook/commit/428e482ac7b86e4f12c5ca8c79e419cb47250ea7
Looking at line 53 in entries.nim
:
if j >= 0 and j < book.toc.entries.high:
result = book.toc.entries[j].url
j < book.toc.entries.high
means that if j
is the last entry (book.toc.entries.high
), the body won't run and we won't get an arrow on the second to last page. If we change it to j <= book.toc.entries.high
it should work. (in my head at least)
Can confirm that it works locally, will add this to my upcoming PR as well.
Seen in this live example: https://philippmdoerner.github.io/Snorlogue/bookCompiled/customDatatypes.html
There is an additional entry (change log) but "next" arrow is not appearing (in changelog the "previous" arrow appears)
Cc @PhilippMDoerner