plateaukao / einkbro

A small, fast web browser based on Android WebView. It's tailored for E-Ink devices but also works great on normal android devices.
Other
1.13k stars 80 forks source link

Missing codes when converting webpage to EPUB #288

Open meowmeow34 opened 1 year ago

meowmeow34 commented 1 year ago

Please write necessary information as described below. If information is not enough, I may not have time to look into it.

What device and app version are you using Boox Tab Ultra C,

Describe the bug

I am trying to convert some of the webpage, from this ebook to epub.

https://r4ds.hadley.nz/data-visualize

There are some codes on the webpages, and some of these codes were missing in the epub after the conversion. For example, the following codes on the webpage

Original Webpage

ggplot data = penguins, mapping = aes(x = flipper_length_mm, y = body_mass_g, color = species) ) + geom_point() + geom_smooth(method = "lm")

To Reproduce

Example description:

  1. Go to '...' https://r4ds.hadley.nz/data-visualize
  2. Click on '....' Save EPUB in E ink bro option
  3. Scroll down to Page 10.28 of the EPUB, there should be a code of the above before the 2nd chart, after the paragraph:

Since this is a new geometric object representing our data, we will add a new geom as a layer on top of our point geom: geom_smooth.() And we will specify that we want to draw the line of best fit based on a linear model with method = "lm".

  1. See error

The R code is missing in the EPUB

ggplot data = penguins, mapping = aes(x = flipper_length_mm, y = body_mass_g, color = species) ) + geom_point() + geom_smooth(method = "lm")

Expected behavior

The R code above should be appearing in the EPUB

Screenshots If applicable, add screenshots to help explain your problem. Original Webpage Coverted EPUB

Additional context

If the webpage is Saved as PDF, there is no such issue, the code will appear correctly.

plateaukao commented 7 months ago

@meowmeow34 it's very strange. I checked the output epub file, but still don't know why yet.