Feb 27 2021
Assuming the link is prefixed with the document name, why can’t we link to that document whether it is the same or not ?
Feb 26 2021
If the page name is added to the link, I think the first elseif would catch it and build a new link as expected. Could you investigate if the problem is not with the node. I don’t see any title attribute in the neighborhood of href="#foo" and one is needed :
Feb 24 2021
This was working before and was broken during this project. I don’t understand the difficulty to identify such links. As mentioned earlier, any link built this way [[Les pères du système taoïste/Tao-Tei-King#CHAP1]] will work but not with only #CHAP1 inside the brackets. There are many links built that way. I think the conversion was taken care in this function of BookCleanerEpub.php but the first part does not trap #mylink any more :
Feb 4 2021
Same behaviour was observed in fr:Wikisource with links pointing to the same page (first char=#)
example : [ https://wsexport.wmflabs.org/?lang=fr&page=Les_p%C3%A8res_du_syst%C3%A8me_tao%C3%AFste/Tao-Tei-King&format=epub-3&fonts=]
The links in the summary will take you back to Ws website.
Feb 3 2021
I choosed that large pseudo-book only to show that the limitation was not coming from Calibre.
The proposition sounds okay for me.