Skip to content

Commit

Permalink
fix for #26
Browse files Browse the repository at this point in the history
  • Loading branch information
daimor committed Apr 18, 2019
1 parent 267a56b commit 79fcee6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions providers/ObjectScriptDefinitionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@ export class ObjectScriptDefinitionProvider implements vscode.DefinitionProvider
pos += part.length;
}

if (lineText.match(/^#?(?:Include|IncludeGenerator) %?\b[a-zA-Z][a-zA-Z0-9]+(?:\.[a-zA-Z][a-zA-Z0-9]+)*\b/i)) {
let [, name] = lineText.split(' ');
let start = lineText.indexOf(' ') + 1;
let includeMatch = lineText.match(
/^\s*#?(?:Include|IncludeGenerator) (%?\b[a-zA-Z][a-zA-Z0-9]+(?:\.[a-zA-Z][a-zA-Z0-9]+)*\b)/i
);
if (includeMatch) {
let [, name] = includeMatch;
let start = lineText.indexOf(name);
if (this.isValid(position, start, name.length)) {
return [
this.makeRoutineDefinition(position, start, name.length, this.normalizeRoutineName(document, name, 'inc'))
Expand Down

0 comments on commit 79fcee6

Please sign in to comment.