mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Fixed problem with non-standard tiddler types (e.g. .jar)
This commit is contained in:
parent
2c3f96557f
commit
db2fafb0ab
@ -26,11 +26,9 @@ tiddlerInput.parseTiddlerFile = function(text,type,fields) {
|
|||||||
type = fileExtensionMapping;
|
type = fileExtensionMapping;
|
||||||
// Invoke the parser for the specified mimetype
|
// Invoke the parser for the specified mimetype
|
||||||
var parser = tiddlerInput.parseTiddlerFileByMimeType[type];
|
var parser = tiddlerInput.parseTiddlerFileByMimeType[type];
|
||||||
if(parser) {
|
if(!parser)
|
||||||
return parser(text,fields);
|
parser = tiddlerInput.parseTiddlerFileByMimeType["text/plain"];
|
||||||
} else {
|
return parser(text,fields);
|
||||||
throw new Error("Unknown tiddler type in tiddlerInput.parseTiddlerFile: " + type);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
tiddlerInput.fileExtensionMappings = {
|
tiddlerInput.fileExtensionMappings = {
|
||||||
|
Loading…
Reference in New Issue
Block a user