Remove .only and fix fragment used when opening file

Keeping the fragment causes a duplicated file to be opened
This commit is contained in:
Matt Bierner
2021-10-13 19:33:56 -07:00
parent 830987eac3
commit c986aef642
2 changed files with 2 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ import { InMemoryDocument } from './inMemoryDocument';
const testFileName = vscode.Uri.file('test.md');
suite.only('markdown.engine', () => {
suite('markdown.engine', () => {
suite('rendering', () => {
const input = '# hello\n\nworld!';
const output = '<h1 data-line="0" class="code-line" id="hello">hello</h1>\n'

View File

@@ -73,7 +73,7 @@ export async function openDocumentLink(engine: MarkdownEngine, targetResource: v
}
async function tryOpenMdFile(engine: MarkdownEngine, resource: vscode.Uri, column: vscode.ViewColumn): Promise<boolean> {
await vscode.commands.executeCommand('vscode.open', resource, column);
await vscode.commands.executeCommand('vscode.open', resource.with({ fragment: '' }), column);
return tryNavigateToFragmentInActiveEditor(engine, resource);
}