ex_doc icon indicating copy to clipboard operation
ex_doc copied to clipboard

epub: fix fatal errors while parsing EPUB files

Open milmazz opened this issue 2 years ago • 2 comments

After generating the EPUB file for the Elixir docs with this version, and reviewing the result with epubcheck, I got the following summary:

$ epubcheck doc/elixir/Elixir.epub --json elixir_docs.json
Check finished with errors
Messages: 0 fatals / 140 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 fixed, I don't see the banner Below is a rendering of the page up to the first error and also the links to different anchors seems to work.

Fixes: #1851

milmazz avatar Jan 26 '24 03:01 milmazz

Screenshot 2024-08-10 at 8 26 48 AM

I don't know if this is related? But don't give up because this is an amazing tool! please let me know how I can help.

osintowl avatar Aug 10 '24 13:08 osintowl

here is the output for the errors using epubcheck "messages" : [ { "ID" : "RSC-005", "severity" : "ERROR", "message" : "Error while parsing file: element "ol" not allowed yet; expected element "a" or "span"", "additionalLocations" : 0, "locations" : [ { "url" : { "opaque" : false, "hierarchical" : true }, "path" : "OEBPS/nav.xhtml", "line" : 21, "column" : 15, "context" : null } ], "suggestion" : null }, { "ID" : "RSC-012", "severity" : "ERROR", "message" : "Fragment identifier is not defined.", "additionalLocations" : 0, "locations" : [ { "url" : { "opaque" : false, "hierarchical" : true }, "path" : "OEBPS/EntityFingerprint.Fingerprint.xhtml", "line" : 25, "column" : 26, "context" : "https://36ccc1be-51fc-4d98-ac07-46b49c286564.epubcheck.w3c.org/OEBPS/EntityFingerprint.Fingerprint.xhtml#functions" } ], "suggestion" : null }, { "ID" : "RSC-016", "severity" : "FATAL", "message" : "Fatal Error while parsing file: Attribute name "data-no-tooltip" associated with an element type "a" must be followed by the ' = ' character.", "additionalLocations" : 0, "locations" : [ { "url" : { "opaque" : false, "hierarchical" : true },

osintowl avatar Aug 10 '24 13:08 osintowl