parseLinktext

parseLinktext() function

Parses the linktext of a wikilink into its component parts.

Signature:

export function parseLinktext(linktext: string): {
    path: string;
    subpath: string;
};

Parameters

ParameterTypeDescription
linktextstringA wikilink without the leading and trailing

Returns:

{ path: string; subpath: string; }

filepath and subpath (subpath can refer either to a block id, or a heading)