MCPcopy
hub / github.com/marktext/marktext / hasMarkdownExtension

Function hasMarkdownExtension

packages/desktop/src/common/filesystem/paths.ts:38–41  ·  view source on GitHub ↗
(filename: string)

Source from the content-addressed store, hash-verified

36 * Returns true if the filename matches one of the markdown extensions.
37 */
38export const hasMarkdownExtension = (filename: string): boolean => {
39 if (!filename || typeof filename !== 'string') return false
40 return MARKDOWN_EXTENSIONS.some((ext) => filename.toLowerCase().endsWith(`.${ext}`))
41}
42
43/**
44 * Returns true if the path is an image file.

Callers 4

addFunction · 0.90
changeFunction · 0.90
watchMethod · 0.90
isMarkdownFileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected