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
I'm on Node v21.5.0 and version 6.1.12 of the library. I have a pretty simple test case that I believe should work, judging from the issue about adding comment support to querySelector (#221).
index.js
import { parse } from 'node-html-parser'
import * as fs from 'fs';
const html = fs.readFileSync('./test.html').toString();
const parsed = parse(html, { comment: true });
const comments = parsed.querySelectorAll('!--');
console.log(comments);
test.html
<html>
<body>
<h1>TEST</h1>
<!-- Some comment here. -->
</body>
</html>
However, running this code prints []. I get the same result when the HTML is included inline as a raw string, so I don't think the file handling is at fault.
The text was updated successfully, but these errors were encountered:
I'm on Node v21.5.0 and version 6.1.12 of the library. I have a pretty simple test case that I believe should work, judging from the issue about adding comment support to
querySelector
(#221).index.js
test.html
However, running this code prints
[]
. I get the same result when the HTML is included inline as a raw string, so I don't think the file handling is at fault.The text was updated successfully, but these errors were encountered: