Skip to content

obsidian/functions/normalizePath

Mock of Obsidian’s normalizePath.

Function Description
normalizePath Normalizes a path so it can be used with the vault, exactly as Obsidian’s own does: backslashes and runs of slashes become a single /, leading and trailing slashes are stripped, a path left empty becomes the root /, a no-break space (U+00A0) or a narrow no-break space (U+202F) becomes a plain space, and the result is put in Unicode normalization form NFC.