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

Unable to send to kindle #108

Open
jbouzekri opened this issue Feb 21, 2024 · 1 comment
Open

Unable to send to kindle #108

jbouzekri opened this issue Feb 21, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@jbouzekri
Copy link

I have an error when using the "send to kindle" functionnality with the epub version. Kindle does not provide the detail of the error. However, after processing the epub in an epub validator, it reports the following issues :

Validating using EPUB version 3.2 rules.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(104,29): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(118,59): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(248,25): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(319,26): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(322,53): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(325,45): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(330,52): Fragment identifier is not defined.
Check finished with errors
Messages: 0 fatals / 7 errors / 0 warnings / 0 infos
EPUBCheck completed

After extracting the epub, indeed, in the file epub/EPUB/text/ch001.xhtml, you have a few links with fragment identifier which do not exist in the ch001.xhtml file.

For example : #typescript-configuration-file-tsconfigjson

<li><a href="ch001.xhtml#configuration">Configuration</a></li>
<li><a href="#typescript-configuration-file-tsconfigjson">TypeScript Configuration File ​​tsconfig.json</a>
<ul>
<li><a href="ch001.xhtml#target">target</a></li>

I think you used the README.md file to generate the epub. However between pandoc and Github, they don't process anchor the same way. So for example, the heading Get & Set in Github is generated as get--set but pandoc generates get-set. You have other cases with special chars like . too.

Note that there is no carriage return before the ## Introduction heading too so it is not process correctly by pandoc.

However I am not sure if all this is the cause of the error on kindle side.

@gibbok
Copy link
Owner

gibbok commented Feb 23, 2024

@jbouzekri Hi, thanks for reporting. Yes, I can confirm issues with the validation, but unfortunately, I do not have a Kindle to verify.

@gibbok gibbok added the good first issue Good for newcomers label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants