mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
parse only cson files when reading notes
This commit is contained in:
@@ -17,6 +17,9 @@ function resolveStorageNotes (storage) {
|
|||||||
notePathList = []
|
notePathList = []
|
||||||
}
|
}
|
||||||
let notes = notePathList
|
let notes = notePathList
|
||||||
|
.filter(function filterOnlyCSONFile (notePath) {
|
||||||
|
return /\.cson$/.test(notePath)
|
||||||
|
})
|
||||||
.map(function parseCSONFile (notePath) {
|
.map(function parseCSONFile (notePath) {
|
||||||
let data = CSON.readFileSync(path.join(notesDirPath, notePath))
|
let data = CSON.readFileSync(path.join(notesDirPath, notePath))
|
||||||
data.key = path.basename(notePath, '.cson')
|
data.key = path.basename(notePath, '.cson')
|
||||||
|
|||||||
Reference in New Issue
Block a user