Skip to content

Commit

Permalink
💬 add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhang-gh committed Oct 21, 2023
1 parent 0d55bb0 commit 666e2b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function registerAutoPreview() {

// VS Code dispatches a series of DidChangeActiveTextEditor events when moving tabs between groups, we don't want most of them.
function triggerAutoPreview(editor: vscode.TextEditor | undefined): void {
// GitHub issues #1282, #1342
const markdownRe = /(\.md|\.markdown)$/i
if (!(editor && editor.document.uri.scheme === 'file' && markdownRe.test(editor.document.fileName))) {
return;
Expand Down

0 comments on commit 666e2b1

Please sign in to comment.