Hupotronic / ExLinks

A userscript to make E-Hentai & ExHentai links on 4chan & Foolz archive more useful. Includes ExSauce.
http://hupotronic.github.com/ExLinks/
46 stars 6 forks source link

Link conversion problem #26

Closed friendlyanon closed 11 years ago

friendlyanon commented 11 years ago

Only a part of the element's contents is turned into an exlink http://i.imgur.com/wugXcDK.png

Hupotronic commented 11 years ago

This should be fixed already. Make sure you're running the latest version.

friendlyanon commented 11 years ago

I'm using the latest (2.1.7) version on that picture. Could it be that I have a userscript that removes wbr and a lot more elements with DAMNodeInserted and your script can't handle the separate text nodes left by removing the wbr element?

EDIT: with 4chan linkify, your script should just look up the properly converted anchor elements, to avoid such behaviour

Hupotronic commented 11 years ago

Could it be that I have a userscript that removes wbr and a lot more elements with DAMNodeInserted and your script can't handle the separate text nodes left by removing the wbr element?

Yes, ExLinks is not build to look at separate text nodes right next to each other, because that kind of structure should not exist in normal scenarios. Anything that removes wbrs should merge textnodes together, really. This is what ExLinks does for wbrs in links.

ExLinks has been able to parse any existing link elements for a long time (since it's required for archive support where links in plaintext are automatically converted to actual links), so if you're getting broken links, your linkifier is broken. Most likely it can't handle links spanning two textnodes either. If I recall correctly, 4chan Linkify should also remove wbrs properly on its own.

So the bottom line is that you should either fix your wbr remover script or get rid of it.

friendlyanon commented 11 years ago

Well, 4chan linkify can linkify fine.

Does Exlinks ignore the already linkified anchor element and tries to linkify on its own? Why not just use the already linkified link? Csimi has fixed his script long ago.

Hupotronic commented 11 years ago

As I said, ExLinks parses any existing links that aren't quote links in posts. If it's not recognizing existing links, then you most likely have 4chan Linkify running after ExLinks, in which case you should change the execution order.