@@ -15,10 +15,13 @@ function workspaceFile(...segments: string[]) {
15
15
}
16
16
17
17
async function getLinksForFile ( file : vscode . Uri ) : Promise < vscode . DocumentLink [ ] > {
18
- return ( await vscode . commands . executeCommand < vscode . DocumentLink [ ] > ( 'vscode.executeLinkProvider' , file ) ) ! ;
18
+ console . log ( 'getting links' , file . toString ( ) , Date . now ( ) ) ;
19
+ const r = ( await vscode . commands . executeCommand < vscode . DocumentLink [ ] > ( 'vscode.executeLinkProvider' , file ) ) ! ;
20
+ console . log ( 'got links' , file . toString ( ) , Date . now ( ) ) ;
21
+ return r ;
19
22
}
20
23
21
- suite ( 'Markdown Document links' , ( ) => {
24
+ suite . skip ( 'Markdown Document links' , ( ) => {
22
25
23
26
setup ( async ( ) => {
24
27
// the tests make the assumption that link providers are already registered
@@ -94,7 +97,6 @@ suite('Markdown Document links', () => {
94
97
assert . strictEqual ( vscode . window . activeTextEditor ! . selection . start . line , 1 ) ;
95
98
} ) ;
96
99
97
-
98
100
test ( 'Should navigate to line number within non-md file' , async ( ) => {
99
101
await withFileContents ( testFileA , '[b](sub/foo.txt#L3)' ) ;
100
102
@@ -147,15 +149,21 @@ function assertActiveDocumentUri(expectedUri: vscode.Uri) {
147
149
}
148
150
149
151
async function withFileContents ( file : vscode . Uri , contents : string ) : Promise < void > {
152
+ console . log ( 'openTextDocument' , file . toString ( ) , Date . now ( ) ) ;
150
153
const document = await vscode . workspace . openTextDocument ( file ) ;
154
+ console . log ( 'showTextDocument' , file . toString ( ) , Date . now ( ) ) ;
151
155
const editor = await vscode . window . showTextDocument ( document ) ;
156
+ console . log ( 'editTextDocument' , file . toString ( ) , Date . now ( ) ) ;
152
157
await editor . edit ( edit => {
153
158
edit . replace ( new vscode . Range ( 0 , 0 , 1000 , 0 ) , contents ) ;
154
159
} ) ;
160
+ console . log ( 'opened done' , vscode . window . activeTextEditor ?. document . toString ( ) , Date . now ( ) ) ;
155
161
}
156
162
157
163
async function executeLink ( link : vscode . DocumentLink ) {
164
+ console . log ( 'executeingLink' , link . target ?. toString ( ) , Date . now ( ) ) ;
165
+
158
166
const args = JSON . parse ( decodeURIComponent ( link . target ! . query ) ) ;
159
167
await vscode . commands . executeCommand ( link . target ! . path , args ) ;
168
+ console . log ( 'executedLink' , vscode . window . activeTextEditor ?. document . toString ( ) , Date . now ( ) ) ;
160
169
}
161
-
0 commit comments