Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Incorrect subsection title in TOC #60

Closed
nitxy opened this issue Jun 21, 2022 · 2 comments
Closed

Incorrect subsection title in TOC #60

nitxy opened this issue Jun 21, 2022 · 2 comments
Labels

Comments

@nitxy
Copy link
Contributor

nitxy commented Jun 21, 2022

On line 444 of write.go,
e.toc.addSubSection(relativePath, index, section.xhtml.Title(), relativeSubPath)
should be
e.toc.addSubSection(relativePath, index, child.xhtml.Title(), relativeSubPath)
or else the title of all child sections displayed on TOC would be the same with their parent

https://github.com/bmaupin/go-epub/blob/main/write.go#L444

@bmaupin
Copy link
Owner

bmaupin commented Jun 21, 2022

Since you've already figured out the fix, (similarly to #59) if you're interested in submitting a pull request, let me know. Otherwise I can take a look.

Thanks!

@bmaupin
Copy link
Owner

bmaupin commented Jun 23, 2022

Fixed by #61

@bmaupin bmaupin closed this as completed Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants