You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I started inspecting each of these files I noticed a pattern that matches with the error description of the entity name must immediately follow the '&' in the entity reference.
So, the problem here in particular are the links to anchors like &/1, &&/2 and so on.
Why is this important?
In readers like Apple Books, you get the following warning at the beginning of the document:
And more importantly, once you reach the end of that document you will notice is truncated, at least if you compare that result with the HTML version:
Solution / Discussion
I'm putting this out there to start a discussion to see the approach we want to take for the EPUB formatter, I think we can first try changing those anchors from #&/1 to #&/1 and see if that works, otherwise, given that for the EPUB format the anchor name and links to it are all internal, we can change the anchor generation to be a hash instead.
The text was updated successfully, but these errors were encountered:
After generating the EPUB file for the Elixir docs with this version,
and reviewing the result with `epubcheck`, I got the following summary:
```console
$ epubcheck doc/elixir/Elixir.epub --json elixir_docs.json (base)
Check finished with errors
Messages: 0 fatals / 141 errors / 0 warnings / 0 infos
```
If you compare the previous result with what we had on #1851
```
Messages: 9 fatals / 425 errors / 0 warnings / 0 infos
```
you can see that now we don't have messages with `fatal` severity and we
have reduced considerably the number of errors =)
I manually checked the generated EPUB on Apple Books and the previous
truncated sections are solved, I don't see the banner _Below is a
rendering of the page up to the first error_ and also the links to
anchor different anchor seems to work.
Fixes: #1851
After checking the
Elixir.epub
file withepubcheck
I got the following summary:So, I will start listing here the issue with the highest severity, the one that's causing a fatal error while parsing the XHTML document.
Filtering a little bit the result with
jq
$ jq '.messages[] | select(.severity=="FATAL") | {id: .ID, message: .message, locations: .locations | map({path, line, column})}' elixir_docs.json
We got the following:
When I started inspecting each of these files I noticed a pattern that matches with the error description of the entity name must immediately follow the '&' in the entity reference.
anonymous-functions.xhtml
-><a href="Kernel.SpecialForms.xhtml#&/1">its documentation</a>
basic-types.xhtml
-><a href="Kernel.xhtml#&&/2"><code class="inline">&&/2</code></a>
Bitwise.xhtml
-><a href="#&&&/2"><code class="inline">&&&/2</code></a>
So, the problem here in particular are the links to anchors like
&/1
,&&/2
and so on.Why is this important?
In readers like Apple Books, you get the following warning at the beginning of the document:
And more importantly, once you reach the end of that document you will notice is truncated, at least if you compare that result with the HTML version:
Solution / Discussion
I'm putting this out there to start a discussion to see the approach we want to take for the EPUB formatter, I think we can first try changing those anchors from
#&/1
to#&/1
and see if that works, otherwise, given that for the EPUB format the anchor name and links to it are all internal, we can change the anchor generation to be a hash instead.The text was updated successfully, but these errors were encountered: