mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2025-12-27 20:33:08 -08:00
parseText() now accepts file extensions as well as content types
This commit is contained in:
parent
92e3eb233a
commit
d402f4d9b2
1 changed files with 3 additions and 0 deletions
|
|
@ -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"];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue