mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-16 18:25:17 +02:00
Enhance wiki link handling during file renaming
This commit is contained in:
parent
9de0b4aea2
commit
34792e9c19
3 changed files with 170 additions and 3 deletions
|
|
@ -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`
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue