gildas-lormeau / SingleFile

Web Extension for saving a faithful copy of a complete web page in a single HTML file
GNU Affero General Public License v3.0
15.43k stars 1.01k forks source link

some code blocks missing #1502

Closed hxlhxl closed 3 months ago

hxlhxl commented 3 months ago

Describe the bug code blocks missing

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://mdxjs.com/docs/using-mdx/'
  2. Click on 'Save file with singlefile'
  3. Open downloaded html
  4. Code block is missing

Expected behavior full content should be downloaded

Screenshots image

Environment

gildas-lormeau commented 3 months ago

Thank you. I confirm I can reproduce the bug. However, if I open the page I saved with Chrome in Firefox or Safari, the blocks are visible. So, it seems to be a tricky issue...

gildas-lormeau commented 3 months ago

Taking a closer look at the problem, it seems that the author has decided to deploy some "experimental" code in production. The problem stems from the following declaration mask-image: paint(squircle);. mask-image is not supported in Safari and Firefox. paint() is also only supported in Chrome, cf. https://developer.mozilla.org/en-US/docs/Web/CSS/image/paint, and could be qualified as experimental. I'll have to look into this, but for this to work properly, the page would have to include a piece of JavaScript code to make calls to CSS.paintWorklet.addModule().

gildas-lormeau commented 3 months ago

It took a bit of work, but I was able to implement Worklet support. The fix will be available in the next version.