Skip to content

Commit

Permalink
build: Add word joiners to split endnote file headers
Browse files Browse the repository at this point in the history
  • Loading branch information
acabal committed Aug 29, 2022
1 parent 8f320d2 commit 809c63d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions se/se_epub_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,11 +649,11 @@ def build(self, run_epubcheck: bool, check_only: bool, build_kobo: bool, build_k
ol_node.append(endnote)

# Generate and set the new title element of the new endnotes file
endnotes_title = f"Endnotes {format(chunk_start, ',d')}{format(chunk_end, ',d')}"
endnotes_title = f"Endnotes {format(chunk_start, ',d')}⁠–⁠{format(chunk_end, ',d')}"
endnotes_header_node = current_endnotes_file.xpath("/html/body/section[contains(@epub:type, 'endnotes')]/*[re:test(@epub:type, '\\btitle\\b')]")[0]
endnotes_header_node.set_text(endnotes_title)
endnotes_title_node = current_endnotes_file.xpath("/html/head/title")[0]
endnotes_title_node.set_text(endnotes_title)
endnotes_title_node.set_text(endnotes_title.replace("⁠", ""))

# Generate our ID map so that we can update links in the ebook later
# We inspect ALL IDs, because we might have an ID that isn't on an endnote
Expand Down

0 comments on commit 809c63d

Please sign in to comment.