Do you have old epubs with one xhtml page per endnote? It is from version 3 of calibre that Kovid proposed a checkbox (in the docx configuration) preventing this separation between the endnotes during a docx -> epub conversion by calibre. An epub -> epub conversion can't change it.
The interface of calibre makes it easy to manually group the notes into a single page, the longest being to determine which files are affected...
I try to do this with a regex-function to run in automatic mode. It runs without an error message.
I have two issues:
1) The editor interface is not updated at the end of the regex-function. If I save a copy of the epub, and examine that file, it shows that the merge was successful. Without really knowing whether to look this side, I tried using
apply_container_update_to_gui, but I was unsuccessful.
How to update the interface?
2) The function is executed in the "spine order". But
how to indicate that we want to start with the 1st file of the book regardless of the current file, in order to group the notes in the 1st note file.
A test file is joined.