alexadam / save-as-ebook

Save a web page/selection as an eBook (.epub format) - a Chrome/Firefox/Opera Web Extension
MIT License
1.1k stars 70 forks source link

display block missing in some classes #50

Open bunglegrind opened 2 years ago

bunglegrind commented 2 years ago

If I convert the following url to a epub (save page):

https://overreacted.io/making-setinterval-declarative-with-react-hooks/

with the following custom css rules:

header h3,
.react-toggle,
main article header p,
footer,
aside
{display: none!important;}

body div div div div
{
  max-width: 90%!important;
} 

the display:block in class .gatsby-highlight-code-line is not present in the epub. leading to issues in visualization (as example please notice the first code box when "Your custom logic here" is written).

I'm using Firefox 90.0.2 on Windows.

bunglegrind commented 2 years ago

It seems that adding "display" to the array supportedCss in https://github.com/alexadam/save-as-ebook/blob/12a4cbb0813742a9617e30e73497f8cd9e403c41/web-extension/extractHtml.js#L38 fixes the issue