1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-30 15:13:00 +00:00

Update HTML deserializer to cope with TiddlyWiki classic and TW5 files

This commit is contained in:
Jeremy Ruston
2013-04-03 12:57:17 +01:00
parent c182533efc
commit 6c210df0bd
3 changed files with 66 additions and 49 deletions

View File

@@ -35,8 +35,7 @@ Command.prototype.execute = function() {
self.callback(err);
} else {
var fields = {title: self.params[0]},
extname = path.extname(self.params[0]),
type = extname === ".html" ? "application/vnd.tiddlywiki2" : extname;
type = path.extname(self.params[0]);
var tiddlers = self.commander.wiki.deserializeTiddlers(type,data,fields);
if(!tiddlers) {
self.callback("No tiddlers found in file \"" + self.params[0] + "\"");