mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 08:08:39 +01:00
Markdown: Open Preview - doesn't work for *.prompt.md files (#270417)
This commit is contained in:
committed by
GitHub
parent
0f5bcca45d
commit
cf1a93be3f
@@ -5,6 +5,7 @@
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { CommandManager } from '../commandManager';
|
||||
import { isMarkdownFile } from '../util/file';
|
||||
|
||||
|
||||
// Copied from markdown language service
|
||||
@@ -88,7 +89,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) {
|
||||
|
||||
Reference in New Issue
Block a user