mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-06 17:49:07 -05:00
[GH-ISSUE #1052] Unable to open epub version of book in ClearView #4297
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @arulk on GitHub (Nov 25, 2025).
Original GitHub issue: https://github.com/harvard-edge/cs249r_book/issues/1052
Originally assigned to: @profvjreddi on GitHub.
When I try to open the epub version of the book, get the following error.
thank
-arul
This page contains the following errors:
error on line 24208 at column 19: Comment must not contain '--' (double-hyphen)
error on line 24213 at column 18: Comment must not contain '--' (double-hyphen)
error on line 24216 at column 19: Comment must not contain '--' (double-hyphen)
Below is a rendering of the page up to the first error.
@profvjreddi commented on GitHub (Nov 25, 2025):
Hi @arulk could you please tell me what reader you are using? It seems to be working ok on the apple reader.
@profvjreddi commented on GitHub (Nov 25, 2025):
Ooh nevermind you literally told me it was ClearView 🤦 Thanks, will look into it.
@profvjreddi commented on GitHub (Nov 25, 2025):
The fix for this issue has been implemented in commit
040b95ef0on thedevbranch.What was fixed
The EPUB XML parsing errors were caused by CSS custom properties (variables like
--crimson,--text-primary) containing double-hyphens, which violate XML comment specifications. All 66 instances of CSS variables inepub.csshave been replaced with their literal hex color values.Next steps
The fix is currently in the
devbranch and needs to be:mainOnce a new release is published, the EPUB should open correctly in ClearView and other strict XML readers.
For immediate testing
If you want to test the fix before the official release, you can build from the
devbranch.@profvjreddi commented on GitHub (Nov 25, 2025):
Update: The fix has now been actually implemented in commit
d85278f87on thedevbranch.What was fixed
The EPUB XML parsing errors were caused by CSS custom properties (variables like
--crimson,--text-primary) containing double-hyphens, which violate XML comment specifications in strict XML parsers.Solution applied:
:rootCSS variable definitions blockvar()references with their literal hex color valuesVerification
Next steps
The fix is currently in the
devbranch and needs to be:mainOnce a new release is published, the EPUB should open correctly in ClearView and other strict XML readers.
For immediate testing
If you want to test the fix before the official release, you can build from the
devbranch.Note
Commit
040b95ef0had the correct commit message but contained no actual file changes (empty commit). The actual fix is now in commitd85278f87.@arulk commented on GitHub (Nov 25, 2025):
Thanks . I will test the fix when it is merged in main.
@profvjreddi commented on GitHub (Nov 27, 2025):
@arulk Could you please try the epub here: https://harvard-edge.github.io/cs249r_book_dev/
This is the development website, and want to know if the ePub there works as I fixed some issues based on your feedback.
@arulk commented on GitHub (Nov 30, 2025):
I am still getting the same error
This page contains the following errors:
error on line 24243 at column 19: Comment must not contain '--' (double-hyphen)
error on line 24248 at column 18: Comment must not contain '--' (double-hyphen)
error on line 24251 at column 19: Comment must not contain '--' (double-hyphen)
Below is a rendering of the page up to the first error.
@profvjreddi commented on GitHub (Nov 30, 2025):
Thanks I am able to see the error now, will try to dig into it! 🤓