#156 - improved support for index-note-based folder notes - fresh head review
- typos correction - comment updates for clarity
This commit is contained in:
parent
60a60dfb72
commit
efe8e13267
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue