mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-15 14:57:42 +00:00
Refine the way that we support serialised external tiddler files
The old way was sufficiently backwards compatible that it was impossible to use TiddlyWiki 5.1.9 to build the tw5.com edition.
This commit is contained in:
@@ -1464,9 +1464,9 @@ $tw.loadTiddlersFromPath = function(filepath,excludeRegExp) {
|
||||
$tw.utils.each(filesInfo.tiddlers,function(tidInfo) {
|
||||
var type = tidInfo.fields.type || "text/plain",
|
||||
typeInfo = $tw.config.contentTypeInfo[type],
|
||||
pathname = path.resolve(filepath,tidInfo.file || tidInfo.tiddlerFile),
|
||||
pathname = path.resolve(filepath,tidInfo.file),
|
||||
text = fs.readFileSync(pathname,typeInfo ? typeInfo.encoding : "utf8");
|
||||
if(tidInfo.tiddlerFile) {
|
||||
if(tidInfo.isTiddlerFile) {
|
||||
var fileTiddlers = $tw.wiki.deserializeTiddlers(path.extname(pathname),text) || [];
|
||||
$tw.utils.each(fileTiddlers,function(tiddler) {
|
||||
$tw.utils.extend(tiddler,tidInfo.fields);
|
||||
|
||||
Reference in New Issue
Block a user