epub icon indicating copy to clipboard operation
epub copied to clipboard

Leading newline in titles

Open Boruch-Baum opened this issue 8 years ago • 0 comments

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()))

Boruch-Baum avatar Dec 13 '16 14:12 Boruch-Baum