Skip to content

filterHighestPriorityNotePaths

Narrows the referencing notes to the ones sharing the best rank.

Those notes are the whole of the ambiguity: one the list ranked below them cannot resolve anything, so reporting it only adds noise. This mirrors pickHighestPriorityNotePath’s conditions rather than re-deciding anything, so the two can only ever agree — whenever that names a winner, this returns exactly that one note.

A list that decides nothing at all — empty, or matching no note — ranks every note NO_PRIORITY_MATCH, so they all tie and every one of them is kept. That is the same list the user saw before, which is correct: nothing has ruled any of them out.

Import:

import { filterHighestPriorityNotePaths } from 'obsidian-dev-utils/obsidian/note-priority';

Signature:

function filterHighestPriorityNotePaths(params: PickHighestPriorityNotePathParams): string[]

Parameters:

ParameterTypeDescription
paramsPickHighestPriorityNotePathParamsThe referencing notes and how to rank one.

Returns: string[] — The notes holding the best rank, in the order they were given.


Links to this page: