stripHeadingForLink
Official
Prepares headings for linking by stripping out some bad combinations of special characters that could break links.
Import:
import { stripHeadingForLink } from 'obsidian';Example:
console.log(stripHeadingForLink('foo:#|^\\\r\n%%[[]]bar')); // foo barSignature:
function stripHeadingForLink(heading: string): stringParameters:
| Parameter | Type | Description |
|---|---|---|
heading | string | The heading to prepare. |
Returns: string — The prepared heading.
Example:
console.log(stripHeadingForLink('foo:#|^\\\r\n%%[[]]bar')); // foo bar