You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cf87e3a
Browse filesBrowse the repository at this point in the historyBrowse files
logDebug(`checkAndProcessFolderAndNewNoteTitle: invoking templateNew because theFolder:"${theFolder}" hasTitle:${hasTitle} with argsArray:${JSON.stringify(argsArray)}`)
`checkAndProcessFolderAndNewNoteTitle: templateNew returned no filename (user likely cancelled a prompt); not trashing empty note "${emptyNoteFilename}"`,
logDebug(pluginJson,`insertNoteTemplate: renderFrontmatter returned null (prompt cancelled); aborting`)
53
+
return
54
+
}
51
55
if(Editor.type!=='Calendar'){
52
56
// Check if the template wants the note to be created in a folder (or with a new title) and if so, move the empty note to the trash and create a new note in the folder
53
57
logDebug(pluginJson,`insertNoteTemplate: about to checkAndProcessFolderAndNewNoteTitle`)
@@ -56,6 +60,10 @@ export async function insertNoteTemplate(origFileName: string, dailyNoteDate: Da
56
60
logDebug(pluginJson,`render() template with frontmatterAttributes: [${Object.keys(frontmatterAttributes).join(', ')}]`)
Copy file name to clipboardExpand all lines: np.Templating/CHANGELOG.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,38 @@ See Plugin [Documentation](https://noteplan.co/templates/docs) for details on av
6
6
7
7
DBW: REMEMBER THAT IF YOU ADDED ANY HELPERS IMPORTS, ADD THEM TO THE HELPER MODULE TO GIVE SCRIPTS ACCESS TO THEM ALSO
8
8
9
+
## [2.4.5] 2026-05-17 @dwertheimer
10
+
11
+
### Fixed
12
+
13
+
-**Prompt cancel aborts the whole template run:** When the user cancels a Command Bar prompt (including **batched**`showForm`), `render` / `renderFrontmatter` processing now returns **`null`** instead of an empty string. **`templateNew`** and related commands stop before `DataStore.newNote`; **`checkAndProcessFolderAndNewNoteTitle`** does not trash the empty starter note when **`templateNew`** returns no filename. **`insertNoteTemplate`** (Meeting Notes) and **Forms**`processCreateNew` bail out when **`render`** is cancelled.
14
+
15
+
### Changed
16
+
17
+
-**API:**`NPTemplating.render`, exported `render` / `renderTemplate`, and Template Runner `renderTemplate` may resolve to **`null`** on user cancel (callers should treat **`null`** as abort, distinct from **`''`**).
-`np.Templating/CHANGELOG.md`, `np.Templating/plugin.json` — version **2.4.5**
25
+
26
+
## [2.4.4] 2026-05-17 @dwertheimer
27
+
28
+
### Fixed
29
+
30
+
-**Command Bar batched `prompt('Question?', […])` fields:**`parseParameters` treats the question as `varName` and the choice list as `promptMessage`, so `showForm` used **Answer** for `title`/`label`. Batch field labels now take the first quoted argument when `promptMessage` is an array or when it equals the comma-joined choice list (the same mis-parse as a string). The first-argument scanner reads quoted strings properly so labels include apostrophes inside double-quoted text (e.g. `"What's the priority?"`) and commas inside the question.
31
+
32
+
### Added
33
+
34
+
-**Tests (`promptFormBatch.test.js`):** Batched form labels for `prompt(varName, 'Message?', […])`, double-quoted questions, `<%` execution tags, **apostrophes inside `"…"`**, and **commas inside the question** string.
0 commit comments