Skip to content

Commit

Permalink
release 1.2.0-beta.02, fix <select> issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeerickson committed May 18, 2022
1 parent 019c934 commit 089df79
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions np.Templating/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
### About np.Templating Plugin
See Plugin [README](https://github.com/NotePlan/plugins/blob/main/np.Templating/README.md) for details on available commands and use case.

## [1.2.0-beta.02] - 2022-05-17 (mikeerickson)

- fixed issue when template contains folder which has value of `<select>` to prompt user of where new note should be created (@jgclark)

## [1.2.0-beta.01] - 2022-05-15 (mikeerickson)

- added `templateGroupTemplatesByFolder` setting (default: false)
Expand Down
1 change: 0 additions & 1 deletion np.Templating/lib/TemplatingEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import FrontmatterModule from '@templatingModules/FrontmatterModule'

import pluginJson from '../plugin.json'
import { clo, log } from '@helpers/dev'
import { debug } from '../lib/helpers'

// this is a customized version of `ejs` adding support for async actions (use await in template)
// review `Test (Async)` template for example`
Expand Down
2 changes: 1 addition & 1 deletion np.Templating/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"noteplan.minAppVersion": "3.5.0",
"plugin.id": "np.Templating",
"plugin.name": " 📒 np.Templating -- New 🎉",
"plugin.version": "1.2.0-beta.01",
"plugin.version": "1.2.0-beta.02",
"plugin.description": "Templating Plugin for NotePlan",
"plugin.author": "Mike Erickson (@codedungeon)",
"plugin.dependencies": [],
Expand Down
8 changes: 4 additions & 4 deletions np.Templating/src/Templating.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ export async function templateQuickNote(noteName: string = ''): Promise<void> {
const { frontmatterBody, frontmatterAttributes } = await NPTemplating.preRender(templateData)

let folder = frontmatterAttributes?.folder.trim() ?? ''
if (folder === '') {
folder = await NPTemplating.getFolder(folder, 'Select Destination Folder')
if (frontmatterAttributes?.folder && frontmatterAttributes.folder.length > 0) {
folder = await NPTemplating.getFolder(frontmatterAttributes.folder, 'Select Destination Folder')
}

let newNoteTitle = ''
Expand Down Expand Up @@ -387,8 +387,8 @@ export async function templateMeetingNote(noteName: string = '', templateData: a
const { frontmatterBody, frontmatterAttributes } = await NPTemplating.preRender(templateData)

let folder = frontmatterAttributes?.folder.trim() ?? ''
if (folder === '') {
folder = await NPTemplating.getFolder(folder, 'Select Destination Folder')
if (frontmatterAttributes?.folder && frontmatterAttributes.folder.length > 0) {
folder = await NPTemplating.getFolder(frontmatterAttributes.folder, 'Select Destination Folder')
}

let newNoteTitle = ''
Expand Down

0 comments on commit 089df79

Please sign in to comment.