MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / isMarkdownFilePath

Function isMarkdownFilePath

apps/desktop/src/main/file-open.ts:5–10  ·  view source on GitHub ↗
(candidate: string)

Source from the content-addressed store, hash-verified

3export const MARKDOWN_FILE_EXTENSIONS = ['.md', '.markdown'] as const
4
5export function isMarkdownFilePath(candidate: string): boolean {
6 const trimmed = candidate.trim()
7 if (!trimmed) return false
8 const ext = path.extname(trimmed).toLowerCase()
9 return (MARKDOWN_FILE_EXTENSIONS as readonly string[]).includes(ext)
10}
11
12/**
13 * Vault-relative, POSIX-separated note path for `absPath`, or null when

Callers 5

file-open.test.tsFile · 0.90
openMarkdownFileFromOSFunction · 0.90
registerIpcFunction · 0.90
assertMarkdownFunction · 0.85
markdownPathsFromArgvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected