mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 10:19:02 +00:00
@@ -10,7 +10,7 @@ import * as vscode from 'vscode';
|
||||
import { MarkdownContributionProvider as MarkdownContributionProvider } from './markdownExtensions';
|
||||
import { Slugifier } from './slugify';
|
||||
import { SkinnyTextDocument } from './tableOfContentsProvider';
|
||||
import { Schemes, isOfScheme } from './util/links';
|
||||
import { MarkdownFileExtensions, Schemes, isOfScheme } from './util/links';
|
||||
|
||||
const UNICODE_NEWLINE_REGEX = /\u2028|\u2029/g;
|
||||
|
||||
@@ -251,7 +251,9 @@ export class MarkdownEngine {
|
||||
}
|
||||
}
|
||||
|
||||
if (uri.fragment) {
|
||||
const extname = path.extname(uri.fsPath);
|
||||
|
||||
if (uri.fragment && (extname === '' || MarkdownFileExtensions.includes(extname))) {
|
||||
uri = uri.with({
|
||||
fragment: this.slugifier.fromHeading(uri.fragment).value
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user