Skip to content

Commit

Permalink
fix(openLiteraturNote): check for path not being case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 17, 2024
1 parent 3f54b17 commit 778ab59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2932,21 +2932,21 @@ to set a hotkey for adding DOI/ISBN</string>
<key>variables</key>
<dict>
<key>_format_citation_end</key>
<string></string>
<string>]</string>
<key>_format_citation_start</key>
<string></string>
<string>[</string>
<key>_format_citekey_delimiter</key>
<string></string>
<string>; </string>
<key>_format_citekey_prefix</key>
<string></string>
<string>@</string>
<key>_format_citekey_suffix</key>
<string></string>
<key>_format_current_citation_style</key>
<string>formatted single entry</string>
<string>pandoc</string>
<key>_format_page_before_citekey</key>
<string></string>
<string>false</string>
<key>_format_page_prefix</key>
<string></string>
<string>, p. </string>
<key>_format_page_suffix</key>
<string></string>
</dict>
Expand Down
3 changes: 2 additions & 1 deletion scripts/open-create-literature-note.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ function run(argv) {
app.pathTo("home folder") + "/Library/Application Support/obsidian/obsidian.json";
const vaults = JSON.parse(app.read(obsidianJsonFilePath)).vaults;
const isFileInObsidianVault = Object.values(vaults).some((v) =>
literatureNotePath.startsWith(v.path),
// lowercase comparison, since macOS filesystem is case-insensitive
literatureNotePath.toLowerCase().startsWith(v.path.toLowerCase()),
);

if (isFileInObsidianVault) {
Expand Down

0 comments on commit 778ab59

Please sign in to comment.