GULPF / nimquery

Nim library for querying HTML using CSS-selectors (like JavaScripts document.querySelector)
MIT License
134 stars 8 forks source link

Compatibility with fusion/htmlparser/xmltree #18

Closed thatrandomperson5 closed 2 years ago

thatrandomperson5 commented 2 years ago

How would i use it with import fusion/htmlparser/xmltree. I need this because of script tag mismatch which caused the normal parser to break, but now i am getting errors for the below

let styles = xml.querySelectorAll("link")

Any help appreciated.

GULPF commented 2 years ago

Fusion is essentially dead afaik (see https://github.com/nim-lang/RFCs/issues/476). The fact that fusions htmlparser has less bugs is unfortunate, ideally the bug should be fixed in the stdlib.

If you just want to get it to work you can always copy nimquery to your local project (it's only one file and no external dependencies) and try to replace the import of xmltree with the one from fusion, but it might break depending on how much fusions xmltree has deviated from the one in stdlib.