From d402f4d9b29269b129dfad80daa0705a3b78367b Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 9 May 2012 17:35:08 +0100 Subject: [PATCH] parseText() now accepts file extensions as well as content types --- core/modules/wiki.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 9d4285c76..4747547a9 100644 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -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"]; }