如何获得cheerio.js中的节点行号?
我正在使用cheerio.js
如下所示:
var $ = cheerio.load(html,{withStartIndices : true});
当我使用console.log($('#element1'));
。 它将返回字符位置的节点。
{ type: 'tag', name: 'h6', attribs: { align: 'center', id: 'r' }, children: [ [Object] ], next: null, startIndex: 310, .......
有没有什么办法可以在cheerio.js
获取特定元素的行号?