You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the unwrapNoscriptImages() method of the parser uses the image in the noscript tag when there is an image just before it, which works well in that very case. But there is no fallback for when there's no such previous image.
I made my own pre parsing function to fix this behaviours and it seems to work quite well. The idea is to replace the noscript tag in the "else" case of "if prevElement != nil && ps.isSingleImage(prevElement)". Something like that:
Hi !
the unwrapNoscriptImages() method of the parser uses the image in the noscript tag when there is an image just before it, which works well in that very case. But there is no fallback for when there's no such previous image.
I made my own pre parsing function to fix this behaviours and it seems to work quite well. The idea is to replace the noscript tag in the "else" case of "if prevElement != nil && ps.isSingleImage(prevElement)". Something like that:
You can test the difference on https://www.newyorker.com/magazine/2020/06/01/a-window-onto-an-american-nightmare where the cartoons are not visible.
Sorry for not submitting a PR, I can make one if that something you'd prefer.
The text was updated successfully, but these errors were encountered: