epub
epub copied to clipboard
Leading newline in titles
I don't know whether this will prove to be a common issue, but the first (and so far only) epub book I tried to open with this script displayed the table of contents all wrong and strangely truncated. It turned out to be that somehow there were leading newline characters in each "title" string.
The fix for me was to change current line #173 from:
screen.addstr(i, 0, '{0:-5} {1}'.format(start, title))
To:
screen.addstr(i, 0, '{0:-5} {1}'.format(start, title.strip()))