trimMarkdownExtension
Trims the markdown extension from the file path if the file is a markdown file. If the file is not a markdown file, the original file path is returned.
Import:
import { trimMarkdownExtension } from 'obsidian-dev-utils/obsidian/file-system';Signature:
function trimMarkdownExtension(file: TAbstractFile): stringParameters:
| Parameter | Type | Description |
|---|---|---|
file | TAbstractFile | The file to trim the markdown extension from. |
Returns: string — The file path with the markdown extension trimmed.