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

mdash / ndash not supported - fix available #26

Open
clach04 opened this issue Jul 28, 2023 · 3 comments
Open

mdash / ndash not supported - fix available #26

clach04 opened this issue Jul 28, 2023 · 3 comments

Comments

@clach04
Copy link

clach04 commented Jul 28, 2023

Get fatal errors. Should map:

  • &mdash to - u'\u2014'
  • similar for ndash.

Found in issue #24

This is enough to cause truncation and unexpected behaviors in Adobe Digital Editions Version 4.5.11.187303

@clach04
Copy link
Author

clach04 commented Jul 30, 2023

Test case:

# demo for https://github.com/wcember/pypub

import pypub

my_first_epub = pypub.Epub('mdash_demo')
my_first_chapter = pypub.create_chapter_from_string(u'<p>Hello\u2014World</p>', title='mdash Chapter')
my_first_epub.add_chapter(my_first_chapter)
my_first_epub.create_epub('OUTPUT_DIRECTORY')

@clach04
Copy link
Author

clach04 commented Jul 30, 2023

Possibly another manifestation of #18 ?

@clach04
Copy link
Author

clach04 commented Jul 30, 2023

(py27venv) C:\code\py\pypub\pypub>java -jar C:\Programs\epubcheck-5.1.0\epubcheck.jar OUTPUT_DIRECTORY\mdashdemo.epub
Validating using EPUB version 2.0.1 rules.
FATAL(RSC-016): OUTPUT_DIRECTORY/mdashdemo.epub/OEBPS/ch000.xhtml(9,16): Fatal Error while parsing file: The entity "mdash" was referenced, but not declared.

Check finished with errors
Messages: 1 fatal / 0 errors / 0 warnings / 0 infos

EPUBCheck completed

clach04 added a commit to clach04/pypub that referenced this issue Jul 30, 2023
@clach04 clach04 changed the title mdash / ndash not supported mdash / ndash not supported - fix available Jul 30, 2023
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