Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leading newline in titles #20

Open
Boruch-Baum opened this issue Dec 13, 2016 · 0 comments
Open

Leading newline in titles #20

Boruch-Baum opened this issue Dec 13, 2016 · 0 comments

Comments

@Boruch-Baum
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant