1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-27 23:28:38 +02:00

All: Add support for application plugins (#3257)

This commit is contained in:
Laurent
2020-10-09 18:35:46 +01:00
committed by GitHub
parent 833fb1264f
commit fe41d37f8f
804 changed files with 95622 additions and 5307 deletions

View File

@ -1,4 +1,4 @@
const { shim } = require('lib/shim.js');
const shim = require('lib/shim').default;
const { time } = require('lib/time-utils.js');
const Mustache = require('mustache');
@ -47,7 +47,7 @@ TemplateUtils.loadTemplates = async function(filePath) {
// sensitivity ensures that the sort will ignore case
files.sort((a, b) => { return a.path.localeCompare(b.path, undefined, { sensitivity: 'accent' }); });
files.forEach(async file => {
for (const file of files) {
if (file.path.endsWith('.md')) {
try {
const fileString = await shim.fsDriver().readFile(`${filePath}/${file.path}`, 'utf-8');
@ -59,7 +59,7 @@ TemplateUtils.loadTemplates = async function(filePath) {
throw error;
}
}
});
}
}
return templates;