Skip to content

Commit 3eb3cef

Browse files
committed
tweak to getNote logging
1 parent ad3d0ac commit 3eb3cef

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

helpers/note.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ export async function getNote(name?: string, onlyLookInRegularNotes?: boolean |
198198
)
199199
logDebug(
200200
'note/getNote',
201-
` Will try to open: "${name} (${noteName})" using ${onlyLookInRegularNotes ? 'projectNoteByFilename' : 'noteByFilename'} ${hasExtension ? '' : ' (no extension)'} ${
202-
hasFolder ? '' : ' (no folder)'
203-
} ${isCalendarNote ? ' (calendar note)' : ''}`,
201+
` Will try to open: "${name}${noteName !== name ? `(${noteName})` : ''}" using ${onlyLookInRegularNotes ? 'projectNoteByFilename' : 'noteByFilename'} ${
202+
hasExtension ? '' : ' (no extension)'
203+
} ${hasFolder ? '' : ' (no folder)'} ${isCalendarNote ? ' (calendar note)' : ''}`,
204204
)
205205
if (!noteName) {
206206
logError('note/getNote', ` Empty name`)
@@ -238,6 +238,7 @@ export async function getNote(name?: string, onlyLookInRegularNotes?: boolean |
238238
const titleWithoutPath = pathParts.pop() || ''
239239
const pathWithoutTitle = pathParts.join('/') || ''
240240
const potentialNotes = DataStore.projectNoteByTitle(titleWithoutPath)
241+
logDebug('note/getNote', ` Found ${potentialNotes.length} notes by title "${noteName}"`)
241242
if (potentialNotes && potentialNotes.length > 0) {
242243
// Apply both path filters differently depending on the use case
243244
let filteredNotes = potentialNotes

0 commit comments

Comments
 (0)