diff --git a/src/custom-sort/custom-sort.ts b/src/custom-sort/custom-sort.ts index dc4bb9f..d320f56 100644 --- a/src/custom-sort/custom-sort.ts +++ b/src/custom-sort/custom-sort.ts @@ -476,7 +476,7 @@ export const determineSortingGroup = function (entry: TFile | TFolder, spec: Cus case CustomSortGroupType.HasMetadataField: if (group.withMetadataFieldName) { if (ctx?._mCache) { - // For folders - scan metadata of 'folder note' in same-name-as-folder mode + // For folders - scan metadata of 'folder note' in same-name-as-parent-folder mode const notePathToScan: string = aFile ? entry.path : `${entry.path}/${entry.name}.md` let frontMatterCache: FrontMatterCache | undefined = ctx._mCache.getCache(notePathToScan)?.frontmatter let hasMetadata: boolean | undefined = frontMatterCache?.hasOwnProperty(group.withMetadataFieldName) diff --git a/src/test/unit/utils.spec.ts b/src/test/unit/utils.spec.ts index 1f65045..2a60bcb 100644 --- a/src/test/unit/utils.spec.ts +++ b/src/test/unit/utils.spec.ts @@ -27,7 +27,7 @@ describe('lastPathComponent and extractParentFolderPath', () => { ) }) -describe('extractBasenane', () => { +describe('extractBasename', () => { const params: Array<(string|undefined)[]> = [ // Obvious ['index', 'index'], @@ -39,7 +39,7 @@ describe('extractBasenane', () => { ['.md',''], ['.md.md','.md'] ]; - it.each(params)('>%s< should become %s', (s: string|undefined, out: string|undefined) => { + it.each(params)('>%s< should result in %s', (s: string|undefined, out: string|undefined) => { expect(extractBasename(s)).toBe(out) }) })