-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: preserve classes on <html> and <body> tags in EPUBs (#362)
* fix: preserve classes on <html> and <body> tags in EPUBs * refactor: use existing DOMParser and use body attribute of HTMLDocument * feat: add extra classes to identify body wrapper and html wrapper * fix: try parsing EPUB content as XML if parsing it as HTML produces an empty body * fix: use childNodes?.length rather than childElementCount to make sure text nodes are counted * fix: more precise error message when failing to find body content
- Loading branch information
Showing
1 changed file
with
29 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters