rt320 commented on code in PR #294:
URL: https://github.com/apache/daffodil-vscode/pull/294#discussion_r972910319
##########
src/language/providers/utils.ts:
##########
@@ -283,6 +291,33 @@ export function checkSetVariableOpen(
return false
}
+export function getNsPrefix(
+ document: vscode.TextDocument,
+ position: vscode.Position
+) {
+ var initialLineNum = position.line
+ var lineNum = 0
+ while (initialLineNum !== 0 && lineNum <= initialLineNum) {
+ const lineText = document
+ .lineAt(lineNum)
+ .text.substr(0, document.lineAt(lineNum).range.end.character)
Review Comment:
document.lineAt() returns a TextLine. The includes() property isn't
available on a TextLine, It is available on a string, which is what is returned
by the proprty text.substr().

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]