1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Patch to implement feature, exporting notes to JSON (#912, issues/912). (#927)

* Patch to implement feature, exporting notes to JSON (#912, issues/912).

* Revising based on feedback

* Directly calling JSON.stringify on the item
This commit is contained in:
Ben Fisher
2018-11-11 12:17:43 -08:00
committed by Laurent Cozic
parent 3a9948e528
commit 0eb18d206d
4 changed files with 63 additions and 3 deletions

View File

@@ -75,9 +75,14 @@ class BaseItem extends BaseModel {
return r.total;
}
static systemPath(itemOrId) {
if (typeof itemOrId === 'string') return itemOrId + '.md';
return itemOrId.id + '.md';
static systemPath(itemOrId, extension = null) {
if (extension === null)
extension = 'md';
if (typeof itemOrId === 'string')
return itemOrId + '.' + extension;
else
return itemOrId.id + '.' + extension;
}
static isSystemPath(path) {