Enhance wiki link handling during file renaming

This commit is contained in:
tusharmagar 2026-02-24 20:20:52 +05:30
parent 9de0b4aea2
commit 34792e9c19
3 changed files with 170 additions and 3 deletions

View file

@ -9,8 +9,7 @@ export const normalizeWikiPath = (input: string) => {
}
export const ensureMarkdownExtension = (path: string) => {
const lastSegment = path.split('/').pop() ?? path
if (lastSegment.includes('.')) return path
if (path.toLowerCase().endsWith('.md')) return path
return `${path}.md`
}