mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-01-20 11:31:37 -08:00
Addendum to #2610
* Ensure we don’t try to read tiddlers from `.meta` files * Improve docs
This commit is contained in:
parent
1b41b44684
commit
537cfcbf79
2 changed files with 48 additions and 5 deletions
|
|
@ -1592,10 +1592,12 @@ $tw.loadTiddlersFromSpecification = function(filepath) {
|
|||
// Process directory specifier
|
||||
var dirPath = path.resolve(filepath,dirSpec.path),
|
||||
files = fs.readdirSync(dirPath),
|
||||
fileRegExp = new RegExp(dirSpec.filesRegExp || "^.*$");
|
||||
fileRegExp = new RegExp(dirSpec.filesRegExp || "^.*$"),
|
||||
metaRegExp = /^.*\.meta$/;
|
||||
for(var t=0; t<files.length; t++) {
|
||||
if(files[t] !== "tiddlywiki.files" && fileRegExp.test(files[t])) {
|
||||
processFile(dirPath + path.sep + files[t],dirSpec.isTiddlerFile,dirSpec.fields);
|
||||
var filename = files[t];
|
||||
if(filename !== "tiddlywiki.files" && !metaRegExp.test(filename) && fileRegExp.test(filename)) {
|
||||
processFile(dirPath + path.sep + filename,dirSpec.isTiddlerFile,dirSpec.fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue