public getMatchedElement()

in client/src/yaml-support/yaml-locator.ts [77:83]


	public getMatchedElement(textDocument: vscode.TextDocument, pos: vscode.Position): YamlMatchedElement {
		const key: string = textDocument.uri.toString();
		this.ensureCache(key, textDocument);
		const cacheEntry = this.cache[key];
		// findNodeAtPosition will find the matched node at given position
		return findNodeAtPosition(cacheEntry.yamlDocs, cacheEntry.lineLengths, pos.line, pos.character);
	}