Skip to content

Commit efe8e13

Browse files
committed
#156 - improved support for index-note-based folder notes - fresh head review
- typos correction - comment updates for clarity
1 parent 60a60df commit efe8e13

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/custom-sort/custom-sort.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ export const determineSortingGroup = function (entry: TFile | TFolder, spec: Cus
476476
case CustomSortGroupType.HasMetadataField:
477477
if (group.withMetadataFieldName) {
478478
if (ctx?._mCache) {
479-
// For folders - scan metadata of 'folder note' in same-name-as-folder mode
479+
// For folders - scan metadata of 'folder note' in same-name-as-parent-folder mode
480480
const notePathToScan: string = aFile ? entry.path : `${entry.path}/${entry.name}.md`
481481
let frontMatterCache: FrontMatterCache | undefined = ctx._mCache.getCache(notePathToScan)?.frontmatter
482482
let hasMetadata: boolean | undefined = frontMatterCache?.hasOwnProperty(group.withMetadataFieldName)

src/test/unit/utils.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('lastPathComponent and extractParentFolderPath', () => {
2727
)
2828
})
2929

30-
describe('extractBasenane', () => {
30+
describe('extractBasename', () => {
3131
const params: Array<(string|undefined)[]> = [
3232
// Obvious
3333
['index', 'index'],
@@ -39,7 +39,7 @@ describe('extractBasenane', () => {
3939
['.md',''],
4040
['.md.md','.md']
4141
];
42-
it.each(params)('>%s< should become %s', (s: string|undefined, out: string|undefined) => {
42+
it.each(params)('>%s< should result in %s', (s: string|undefined, out: string|undefined) => {
4343
expect(extractBasename(s)).toBe(out)
4444
})
4545
})

0 commit comments

Comments
 (0)