(filepath?: string)
| 25 | * Determines if a file is a markdown file based on its filepath. |
| 26 | */ |
| 27 | export function isMarkdownFile(filepath?: string): boolean { |
| 28 | if (!filepath) { |
| 29 | return false; |
| 30 | } |
| 31 | |
| 32 | const ext = filepath.split(".").pop()?.toLowerCase() || ""; |
| 33 | return ["md", "markdown", "gfm"].includes(ext); |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * State tracker for markdown block analysis to avoid recomputing on each call. |
no test coverage detected