Merge branch 'main' into dev/mjbvz/legitimate-squirrel

This commit is contained in:
Matt Bierner
2025-10-14 23:01:21 -07:00
1299 changed files with 22847 additions and 19390 deletions

View File

@@ -5,6 +5,7 @@
import * as vscode from 'vscode';
import { CommandManager } from '../commandManager';
import { isMarkdownFile } from '../util/file';
// Copied from markdown language service
@@ -87,7 +88,7 @@ function registerMarkdownStatusItem(selector: vscode.DocumentSelector, commandMa
const update = () => {
const activeDoc = vscode.window.activeTextEditor?.document;
const markdownDoc = activeDoc?.languageId === 'markdown' ? activeDoc : undefined;
const markdownDoc = activeDoc && isMarkdownFile(activeDoc) ? activeDoc : undefined;
const enabled = vscode.workspace.getConfiguration('markdown', markdownDoc).get(enabledSettingId);
if (enabled) {

View File

@@ -3,10 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from 'path';
import * as picomatch from 'picomatch';
import * as vscode from 'vscode';
import { TextDocumentEdit } from 'vscode-languageclient';
import { Utils } from 'vscode-uri';
import { MdLanguageClient } from '../client/client';
import { Delayer } from '../util/async';
import { noopToken } from '../util/cancellation';
@@ -137,7 +137,7 @@ class UpdateLinksOnFileRenameHandler extends Disposable {
const choice = await vscode.window.showInformationMessage(
newResources.length === 1
? vscode.l10n.t("Update Markdown links for '{0}'?", path.basename(newResources[0].fsPath))
? vscode.l10n.t("Update Markdown links for '{0}'?", Utils.basename(newResources[0]))
: this._getConfirmMessage(vscode.l10n.t("Update Markdown links for the following {0} files?", newResources.length), newResources), {
modal: true,
}, rejectItem, acceptItem, alwaysItem, neverItem);
@@ -197,7 +197,7 @@ class UpdateLinksOnFileRenameHandler extends Disposable {
const paths = [start];
paths.push('');
paths.push(...resourcesToConfirm.slice(0, MAX_CONFIRM_FILES).map(r => path.basename(r.fsPath)));
paths.push(...resourcesToConfirm.slice(0, MAX_CONFIRM_FILES).map(r => Utils.basename(r)));
if (resourcesToConfirm.length > MAX_CONFIRM_FILES) {
if (resourcesToConfirm.length - MAX_CONFIRM_FILES === 1) {