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
var{parse: parseHtml}=require('node-html-parser')varhtml=`a <!-- b --> c`;varroot=parseHtml(html,{comment: true});// TODO implementvarcomment=root.querySelector('!--');console.log(comment);console.log(comment.innerHTML==' b ');
// dont use magic alias tagname. this would break xmlvarcomment=root.querySelector('comment');
workaround: regex
var{parse: parseHtml}=require('node-html-parser')varhtml=`a <!-- b --> c`;varroot=parseHtml(html,{comment: true});varhtmlTemp=root.toString();varcomment=htmlTemp.match(/<!--(.*?)-->/s);
this should work
workaround: regex
related #13 #220
The text was updated successfully, but these errors were encountered: