From c3c67feb9e9e6a87a3550c654b702c4d09b4a823 Mon Sep 17 00:00:00 2001 From: Mark Wiemer Date: Tue, 29 Oct 2024 20:45:21 -0700 Subject: [PATCH] wip updates --- src/providers/defProvider.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/providers/defProvider.ts b/src/providers/defProvider.ts index 75f2ba04..29b078c3 100644 --- a/src/providers/defProvider.ts +++ b/src/providers/defProvider.ts @@ -2,6 +2,7 @@ import * as vscode from 'vscode'; import { Parser } from '../parser/parser'; import { existsSync } from 'fs'; import { join } from 'path'; +import { Out } from 'src/common/out'; export class DefProvider implements vscode.DefinitionProvider { public async provideDefinition( @@ -100,11 +101,12 @@ export class DefProvider implements vscode.DefinitionProvider { const docPath = document.uri.path; const { text } = document.lineAt(position.line); const includeMatch = text.match( - /(?<=#include).+?\.(ahk|ahk1|ah1|ext)\b/i, + /(?<=#include) *?,? *(.+?\.(ahk|ahk1|ah1|ext))\b/i, ); if (!includeMatch) { return undefined; } + Out.debug(includeMatch?.[1]); /** @example c:/path/to */ const parentGoodPath = docPath.substring(1, docPath.lastIndexOf('/')); const expandedPath = includeMatch[0]