Skip to content

Commit

Permalink
fix: better handling type in frontmatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Jan 3, 2024
1 parent 97b8e54 commit 0244300
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/parse_frontmatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ export function parsePath(
repo.path.defaultName = frontmatter[`${smartKey}.defaultName`] instanceof Array ? frontmatter[`${smartKey}.defaultName`].join("/") : frontmatter[`${smartKey}.defaultName`];
}
if (frontmatter?.[`${smartKey}.type`]) {
repo.path.type = frontmatter[`${smartKey}.type`] as FolderSettings;
const type = frontmatter[`${smartKey}.type`].toLowerCase();
if (type.match(/^(fixed|obsidian|yaml)$/i)) repo.path.type = frontmatter[`${smartKey}.type`] as FolderSettings;
}
}
return repoFrontmatter;
Expand Down

0 comments on commit 0244300

Please sign in to comment.