This is a continuation of T270372. As noted by @Samwilson: All <ref> reference links should be fixed, but there are some works that use manual links to create footnotes and these have not been fixed yet. We don't have a way to identify these, because they're effectively just normal wiki links (as you've pasted above). They used be be identifiable by the fact that they had same-document links, e.g. href="#foo" but Parsoid adds the page name to these, href="Lorem#foo" — we'll add handling for these soon (perhaps in a separate ticket? I'm not sure).
As noted by @Denis_Gagne52: 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 :
/**
* change the internal links
*/
protected function setLinks( DOMDocument $dom ) {
$list = $dom->getElementsByTagName( 'a' );
/** @var DOMElement $node */
foreach ( $list as $node ) {
$href = $node->getAttribute( 'href' );
$title = Util::encodeString( $node->getAttribute( 'title' ) ) . '.xhtml';
if ( substr( $href, 0, 1 ) === '#' ) {