Fix Output
* Only output line number, not column. * Append a newline after first line.
This commit is contained in:
parent
3d916fc9b4
commit
b7e4fc8c15
@ -63,12 +63,12 @@ export class XPathFeatureProvider {
|
|||||||
outputChannel.clear();
|
outputChannel.clear();
|
||||||
|
|
||||||
outputChannel.appendLine(`XPath Query: ${query}`);
|
outputChannel.appendLine(`XPath Query: ${query}`);
|
||||||
outputChannel.append('');
|
outputChannel.append('\n');
|
||||||
|
|
||||||
// node.lineNumber and node.columnNumber are not standard properties of the Node object (implemented by xmldom)
|
// 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
|
// 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.lineNumber}, ${node.columnNumber}] ${node.localName}: ${node.textContent}`);
|
outputChannel.appendLine(`[Line ${node.lineNumber}] ${node.localName}: ${node.textContent}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
outputChannel.show(vsc.ViewColumn.Three);
|
outputChannel.show(vsc.ViewColumn.Three);
|
||||||
|
Loading…
Reference in New Issue
Block a user