Fix attribute class redefined error on some epub files#457
Open
marcqtan wants to merge 32 commits intoFolioReader:masterfrom
Open
Fix attribute class redefined error on some epub files#457marcqtan wants to merge 32 commits intoFolioReader:masterfrom
marcqtan wants to merge 32 commits intoFolioReader:masterfrom
Conversation
Some epubs, have an html content with "class" attribute. FolioReader will fail since it's also defining its class attribute. Fixed this by adding a logic to check if the class attribute already exist, if it does then just append the class attribute of FolioReader to the already existing class attribute of the Epub file. Otherwise, just add the class attribute directly to the htmlcontent.
|
how are you finding this library so far, i am looking for a open source epub reader for ios and android and couldnt find anything so far except this, also is there a flutter version if you know? |
Author
yes. i'm actually using flutter to display epub files. I'm using epub_kitty package which is also using this library (folioreader). |
|
can someone review these PRs and feedback the contributor ? |
Wojtek1234
approved these changes
Oct 20, 2020
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some epubs, have an html content with "class" attribute. FolioReader
will fail since it's also defining its class attribute.
Fixed this by adding a logic to check if the class attribute already exist,
if it does then just append the class attribute of FolioReader to the already
existing class attribute of the Epub file. Otherwise, just add the class attribute
directly to the htmlcontent.
Example epub html content:
With my fix the class attribute will become like class="lora nightmode hltr" (sample only)
Will fix #456