mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-30 23:23:02 +00:00 
			
		
		
		
	parseText() now accepts file extensions as well as content types
This commit is contained in:
		| @@ -268,6 +268,9 @@ Options are: | |||||||
| exports.parseText = function(type,text,options) { | exports.parseText = function(type,text,options) { | ||||||
| 	options = options || {}; | 	options = options || {}; | ||||||
| 	var parser = this.parsers[type]; | 	var parser = this.parsers[type]; | ||||||
|  | 	if(!parser && $tw.config.fileExtensions[type]) { | ||||||
|  | 		parser = this.parsers[$tw.config.fileExtensions[type].type]; | ||||||
|  | 	} | ||||||
| 	if(!parser) { | 	if(!parser) { | ||||||
| 		parser = this.parsers[options.defaultType || "text/x-tiddlywiki"]; | 		parser = this.parsers[options.defaultType || "text/x-tiddlywiki"]; | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston