(filePath: string)
| 100 | } |
| 101 | |
| 102 | export function getSourceSaveLanguage(filePath: string): SourceSaveLanguage | null { |
| 103 | const lower = filePath.toLowerCase(); |
| 104 | if (lower.endsWith(".mdx")) return "mdx"; |
| 105 | if (lower.endsWith(".md")) return "markdown"; |
| 106 | if (lower.endsWith(".txt")) return "text"; |
| 107 | return null; |
| 108 | } |
| 109 | |
| 110 | export function basenameFromPath(filePath: string): string { |
| 111 | const normalized = filePath.replace(/\\/g, "/"); |