stripHeading
Official
Normalizes headings for link matching by stripping out special characters and shrinking consecutive spaces.
Import:
import { stripHeading } from 'obsidian';Example:
console.log(stripHeading('foo!"#$%&()*+,.:;<=>?@^`{|}~\/\[\]\\\r\nbar')); // foo barSignature:
function stripHeading(heading: string): stringParameters:
| Parameter | Type | Description |
|---|---|---|
heading | string | The heading to normalize. |
Returns: string — The normalized heading.
Example:
console.log(stripHeading('foo!"#$%&()*+,.:;<=>?@^`{|}~\/\[\]\\\r\nbar')); // foo bar