Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken links for elements without IDs in lists rendered by EPUB3 backend #25

Open
meonkeys opened this issue May 16, 2024 · 0 comments
Open

Comments

@meonkeys
Copy link

If I generate an EPUB, the lists render properly, but the links don't work unless the blocks have explicit IDs.

Repro source: https://github.com/meonkeys/asciidoctor-lists-repro01/blob/main/book/repro.adoc?plain=1

Repro output EPUB: https://github.com/meonkeys/asciidoctor-lists-repro01/blob/main/REPRO-OUTPUT.epub

Try clicking on the different links in the "Cross references" chapter in an ebook reader.

Figures

Figure 1. An image                    <-- BROKEN
Figure 2. An image with an ID         <-- WORKS

Tables

Table 1. A Made-up table              <-- BROKEN
Table 2. A Made-up table with an ID   <-- WORKS 

Sidebars

A sidebar                             <-- BROKEN
A sidebar with an ID                  <-- WORKS 

Code snippets

Listing 1. A code snippet             <-- BROKEN
Listing 2. A code snippet with an ID  <-- WORKS 

I'm using calibre ebook viewer from calibre 5.37 on ubuntu 22.04 LTS.

If I generate HTML or PDF from that same Asciidoc source the links work as intended.

Note the output of asciidoctor-epub3 includes these warnings:

asciidoctor: WARNING: repro.adoc: invalid reference to unknown anchor: fe7f57ab-a172-4857-aa09-5e0a7c9cb00b
asciidoctor: WARNING: repro.adoc: invalid reference to unknown anchor: aaf0ca38-e48f-4432-b5b6-73f6cb8a8e1d
asciidoctor: WARNING: repro.adoc: invalid reference to unknown anchor: 94294979-2320-4b94-bc00-2da3162abcfe
asciidoctor: WARNING: repro.adoc: invalid reference to unknown anchor: c445093a-10bf-4efb-98b1-36e498958244

Possibly related to asciidoctor/asciidoctor-epub3#317 or one of the other issues in that repro related to cross references, IDs, and linking.

meonkeys added a commit to meonkeys/shb that referenced this issue May 16, 2024
* adds handy indexes to figures (images), tables, sidebars (set apart lists and checklists), and code snippets / listings, near the back of the book
* I had to add explicit IDs to everything because of <Alwinator/asciidoctor-lists#25>, so I got to learn the syntax to do so!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant