TagSpaces is an offline, open source, document manager with tagging support
fix: issue with the template parsing
Ilian Sapundshiev19be104cb09f
diff --git a/src/renderer/components/dialogs/NewFileDialog.tsx b/src/renderer/components/dialogs/NewFileDialog.tsxindex fcde90c13..cd6919224 100644--- a/src/renderer/components/dialogs/NewFileDialog.tsx+++ b/src/renderer/components/dialogs/NewFileDialog.tsx@@ -139,10 +139,13 @@ function NewFileDialog(props: Props) {const creationDate = new Date().toISOString();const dateTimeArray = creationDate.split('T');const fileContent = template.content- .replace('{createdInApp}', `${t('core:createdIn')} ${versionMeta.name}`)- .replace('{date}', dateTimeArray[0])- .replace('{author}', author)- .replace('{time}', dateTimeArray[1].split('.')[0]);+ .replaceAll(+ '{createdInApp}',+ `${t('core:createdIn')} ${versionMeta.name}`,+ )+ .replaceAll('{date}', dateTimeArray[0])+ .replaceAll('{author}', author)+ .replaceAll('{time}', dateTimeArray[1].split('.')[0]);return fileType === 'html' ? `\n<p>${fileContent}</p>` : `${fileContent}`;}