1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

parseText() now accepts file extensions as well as content types

This commit is contained in:
Jeremy Ruston 2012-05-09 17:35:08 +01:00
parent 92e3eb233a
commit d402f4d9b2

View File

@ -268,6 +268,9 @@ Options are:
exports.parseText = function(type,text,options) {
options = options || {};
var parser = this.parsers[type];
if(!parser && $tw.config.fileExtensions[type]) {
parser = this.parsers[$tw.config.fileExtensions[type].type];
}
if(!parser) {
parser = this.parsers[options.defaultType || "text/x-tiddlywiki"];
}