1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Fixed problem with non-standard tiddler types (e.g. .jar)

This commit is contained in:
Jeremy Ruston 2011-12-03 11:38:57 +00:00
parent 2c3f96557f
commit db2fafb0ab

View File

@ -26,11 +26,9 @@ tiddlerInput.parseTiddlerFile = function(text,type,fields) {
type = fileExtensionMapping;
// Invoke the parser for the specified mimetype
var parser = tiddlerInput.parseTiddlerFileByMimeType[type];
if(parser) {
return parser(text,fields);
} else {
throw new Error("Unknown tiddler type in tiddlerInput.parseTiddlerFile: " + type);
}
if(!parser)
parser = tiddlerInput.parseTiddlerFileByMimeType["text/plain"];
return parser(text,fields);
};
tiddlerInput.fileExtensionMappings = {