Handle self-referencing link in navigation document
banux opened this issue · comments
Bastien Quelen commented
There case where the landmarks link reference a anchor link in the navigation document like #toc.
Hadrien Gardeur commented
This is related to #3
In a navigation document, it's possible to refer for a link to refer to the current document. For example a landmark can refer to a table of content contained in the same document.
This means that we could end up with the following thing in the manifest:
"landmarks": [
{
"href": "#toc",
"title": "Table of Contents"
},
{
"href": "chapter_001.xhtml",
"title": "Begin Reading"
},
{
"href": "copyright.xhtml",
"title": "Copyright Page"
}
]
We need to make sure that when we extract info from the navigation, such fragments are rewritten to point to the navigation document (nav.xhtml#toc
instead of #toc
).
cc @camill-a since this can be relevant for the Swift implementation too