Skip to content

Commit

Permalink
Fix an issue with nested periodic note folder structures
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkboswell committed Jan 28, 2024
1 parent b41fe39 commit 49675fd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reflection",
"version": "1.0.0",
"version": "1.0.2",
"description": "An Obsidian Plugin for seeing daily and weekly notes from this day in years past.",
"main": "main.js",
"scripts": {
Expand Down
14 changes: 7 additions & 7 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,14 @@ export default class Reflection extends Plugin {
}

getTypeOfFile(file) {
switch (file.parent.path) {
case periodicNotesSettings.daily.folder:
return "daily"
case periodicNotesSettings.weekly.folder:
return "weekly"
default:
return;
if (file.parent.path.includes(periodicNotesSettings.daily.folder)) {
return "daily"
}

if (file.parent.path.includes(periodicNotesSettings.weekly.folder)) {
return "weekly"
}
return;
}

async renderContent(view, file) {
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"1.0.0": "0.15.0",
"1.0.1": "0.15.0"
"1.0.1": "0.15.0",
"1.0.2": "0.15.0"
}

0 comments on commit 49675fd

Please sign in to comment.