Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 8ee0708

Browse files
committed
always render on save for notebooks (as they don't execute by default)
1 parent 316a0b5 commit 8ee0708

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.51.0 (Unreleased)
4+
5+
- Always render on save for notebooks (as they don't execute by default)
6+
37
## 1.50.0 (Release on 19 October 2022)
48

59
- Run only selected text for non-empty editor selections

src/providers/preview/preview-util.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ export async function renderOnSave(engine: MarkdownEngine, editor: TextEditor) {
107107
return false;
108108
}
109109

110+
// notebooks automatically get renderOnSave
111+
if (isNotebook(editor.document)) {
112+
return true;
113+
}
114+
110115
// first look for document level editor setting
111116
const docYaml = await documentFrontMatter(engine, editor.document);
112117
const docSetting = readRenderOnSave(docYaml);

0 commit comments

Comments
 (0)