Add Line/Column to XPath Output
This commit is contained in:
parent
a72830b762
commit
3d916fc9b4
@ -65,8 +65,10 @@ export class XPathFeatureProvider {
|
|||||||
outputChannel.appendLine(`XPath Query: ${query}`);
|
outputChannel.appendLine(`XPath Query: ${query}`);
|
||||||
outputChannel.append('');
|
outputChannel.append('');
|
||||||
|
|
||||||
|
// node.lineNumber and node.columnNumber are not standard properties of the Node object (implemented by xmldom)
|
||||||
|
// TypeScript will complain, but should still compile. this is preferable right now over mocking the entire typedef
|
||||||
nodes.forEach((node: Node) => {
|
nodes.forEach((node: Node) => {
|
||||||
outputChannel.appendLine(`${node.localName}: ${node.textContent}`);
|
outputChannel.appendLine(`[${node.lineNumber}, ${node.columnNumber}] ${node.localName}: ${node.textContent}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
outputChannel.show(vsc.ViewColumn.Three);
|
outputChannel.show(vsc.ViewColumn.Three);
|
||||||
|
Loading…
Reference in New Issue
Block a user