Compare commits

...

7 Commits

Author SHA1 Message Date
Riccardo Ferretti
83a90177b9 v0.21.4 2023-04-14 10:39:05 -07:00
Riccardo Ferretti
37aec28af6 Prepare for next release 2023-04-14 10:38:46 -07:00
Riccardo Ferretti
447f7fc068 Fix for #1188 and #1190 - escape backslash in YAML property of generated daily note template 2023-04-14 10:37:37 -07:00
Riccardo Ferretti
ad1243665a Removed unnecessary log message 2023-04-13 17:23:38 -07:00
Riccardo Ferretti
f07de73bc4 v0.21.3 2023-04-12 17:05:49 -07:00
Riccardo Ferretti
c431ccfb62 Preparation for next release 2023-04-12 17:05:25 -07:00
Riccardo Ferretti
f31ef897cc Fix #1188 - Fixed path relative to workspace root 2023-04-12 17:04:23 -07:00
6 changed files with 19 additions and 12 deletions

View File

@@ -4,5 +4,5 @@
],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.21.2"
"version": "0.21.4"
}

View File

@@ -4,6 +4,18 @@ All notable changes to the "foam-vscode" extension will be documented in this fi
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [0.21.4] - 2023-04-14
Fixes and Improvements:
- Fixed issue with generated daily note template due to path escape (#1188, #1190)
## [0.21.3] - 2023-04-12
Fixes and Improvements:
- Fixed relative path from workspace root in templates (#1188)
## [0.21.2] - 2023-04-11
Fixes and Improvements:

View File

@@ -8,7 +8,7 @@
"type": "git"
},
"homepage": "https://github.com/foambubble/foam",
"version": "0.21.2",
"version": "0.21.4",
"license": "MIT",
"publisher": "foam",
"engines": {

View File

@@ -86,7 +86,7 @@ export async function createDailyNoteIfNotExists(targetDate: Date) {
const templateFallbackText = `---
foam_template:
filepath: "${pathFromLegacyConfiguration.toFsPath()}"
filepath: "${pathFromLegacyConfiguration.toFsPath().replace(/\\/g, '\\\\')}"
---
# ${dateFormat(targetDate, titleFormat, false)}
`;

View File

@@ -79,14 +79,6 @@ async function openResource(workspace: FoamWorkspace, args?: OpenResourceArgs) {
: toVsCodeUri(item.uri.asPlain());
return vscode.commands.executeCommand('vscode.open', targetUri);
}
Logger.info(
`${OPEN_COMMAND.command}: No resource matches given args`,
JSON.stringify(args)
);
vscode.window.showInformationMessage(
`${OPEN_COMMAND.command}: No resource matches given args`
);
}
const feature: FoamFeature = {

View File

@@ -349,12 +349,15 @@ export const NoteFactory = {
resolver
);
const newFilePath = template.metadata.has('filepath')
let newFilePath = template.metadata.has('filepath')
? URI.file(template.metadata.get('filepath'))
: isSome(filepathFallbackURI)
? filepathFallbackURI
: await getPathFromTitle(resolver);
if (!newFilePath.path.startsWith('./')) {
newFilePath = asAbsoluteWorkspaceUri(newFilePath);
}
return NoteFactory.createNote(
newFilePath,
template.text,