mirror of
https://github.com/foambubble/foam.git
synced 2026-01-11 06:58:11 -05:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83a90177b9 | ||
|
|
37aec28af6 | ||
|
|
447f7fc068 | ||
|
|
ad1243665a | ||
|
|
f07de73bc4 | ||
|
|
c431ccfb62 | ||
|
|
f31ef897cc |
@@ -4,5 +4,5 @@
|
||||
],
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"version": "0.21.2"
|
||||
"version": "0.21.4"
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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)}
|
||||
`;
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user