We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For now, EpubCheck 4.0.1 complains sphinx epub(3) builder's output is invalid for entity references (even if PR#2805 was applied):
FATAL(RSC-016): Fatal Error while parsing file 'The entity "copy" was referenced, but not declared.'
Currently, in the sphinx code tree, there are many embeded entity references (in locales and themes), so, we can take two approaches:
Latter approach can be reached using htmlentityrefs of standard python library, for example, like this:
htmlentityrefs
import re from htmlentitydefs import name2codepoint # python 2.7 _name2codepoint4html5rgx = re.compile(r"&({});".format("|".join( (n for n in name2codepoint if n not in ("amp", "lt", "gt", "quot", "apos"))))) def _unescape_for_html5(s): def _sub(m): n = m.group(1) #return chr(name2codepoint[n]) return "&#{};".format(name2codepoint[n]) return _name2codepoint4html5rgx.sub(_sub, s)
The text was updated successfully, but these errors were encountered:
update:
import re from six.moves import html_entities _name2codepoint4html5rgx = re.compile(r"&({});".format("|".join( (n for n in html_entities.name2codepoint if n not in ("amp", "lt", "gt", "quot", "apos"))))) def _unescape_for_html5(s): def _sub(m): n = m.group(1) #return chr(name2codepoint[n]) return "&#{};".format(html_entities.name2codepoint[n]) return _name2codepoint4html5rgx.sub(_sub, s)
Sorry, something went wrong.
Sorry, I can't reproduce the problem. Could you show me any reproducible example?
@hhsprings ping
Unfortunately, I can't reproduce this yet. So I close this now. Please let me know if you still get same error.
Thanks,
No branches or pull requests
For now, EpubCheck 4.0.1 complains sphinx epub(3) builder's output is invalid for entity references (even if PR#2805 was applied):
Currently, in the sphinx code tree, there are many embeded entity references (in locales and themes), so, we can take two approaches:
Latter approach can be reached using
htmlentityrefs
of standard python library, for example, like this:The text was updated successfully, but these errors were encountered: