🐛 (title) only use title notes not path
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
export const filenameToNoteTitle = (title: string) =>
|
||||
title.replaceAll('/', ' / ').replaceAll('-', ' ')
|
||||
|
||||
export const pathToNoteTitle = (path: string) => {
|
||||
export const pathToNotePathTitle = (path: string) => {
|
||||
const fileNames = path.split('.')
|
||||
|
||||
fileNames.pop()
|
||||
@@ -12,3 +12,7 @@ export const pathToNoteTitle = (path: string) => {
|
||||
.join('/')
|
||||
.replaceAll('-', ' ')
|
||||
}
|
||||
|
||||
export const pathToNoteTitle = (notePathTitle: string) => {
|
||||
return pathToNotePathTitle(notePathTitle).split('/').pop()?.trim() ?? ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user