EditReferencesParams.referenceDefinitionConverter?
EditReferencesParams › referenceDefinitionConverter?
Type: (definition: ReferenceLinkCache) => Promisable<MaybeReturn<null | string>>
The function that returns the new destination of each reference-style link definition ([id]: destination "title"). Obsidian reports those in CachedMetadata.referenceLinks, not among the references EditReferencesParams.referenceConverter receives, so without this function they are never edited.It returns the destination unescaped, in the form of
ReferenceLinkCache.link, or undefined to leave the definition unchanged. Only the destination is rewritten: the id, the title, the angle brackets and every use of the definition ([text][id], [id]) stay as written. A definition whose content no longer matches its metadata is left unchanged. See referenceDefinitionToFileChange. A canvas file has no definitions.The offset range applies to the definition's whole position. The heading skip and EditReferencesParams.shouldSkipReference do not apply, since a definition is never in a heading and is not a
Reference.