Skip to content

TagSpaces is an offline, open source, document manager with tagging support

feature: format json export with 2 chars intend

Ilian Sapundshievcc804b08c8ee
diff --git a/app/reducers/taglibrary.ts b/app/reducers/taglibrary.ts
index cb84b713d..ec03e0637 100644
--- a/app/reducers/taglibrary.ts
+++ b/app/reducers/taglibrary.ts
@@ -751,9 +751,12 @@ export const actions = {
}
});
- const blob = new Blob([jsonFormat + JSON.stringify(allTagGroups) + '}'], {
- type: 'application/json'
- });
+ const blob = new Blob(
+ [jsonFormat + JSON.stringify(allTagGroups, null, 2) + '}'],
+ {
+ type: 'application/json'
+ }
+ );
const dateTimeTag = formatDateTime4Tag(new Date(), true);
saveAsTextFile(blob, 'tag-library [tagspaces ' + dateTimeTag + '].json');
console.log('Tag library exported...');