mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-07 16:00:28 +00:00
refactor: $tw.utils.extend({},options) -> options || {}
This commit is contained in:
parent
4ddcbc665e
commit
4e896d18a0
@ -1064,7 +1064,7 @@ exports.parseText = function(type,text,options) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.getParser = function(type,options) {
|
exports.getParser = function(type,options) {
|
||||||
options = $tw.utils.extend({},options);
|
options = options || {};
|
||||||
// Select a parser
|
// Select a parser
|
||||||
var Parser = $tw.Wiki.parsers[type];
|
var Parser = $tw.Wiki.parsers[type];
|
||||||
if(!Parser && $tw.utils.getFileExtensionInfo(type)) {
|
if(!Parser && $tw.utils.getFileExtensionInfo(type)) {
|
||||||
@ -1083,7 +1083,7 @@ exports.getParser = function(type,options) {
|
|||||||
Parse a tiddler according to its MIME type
|
Parse a tiddler according to its MIME type
|
||||||
*/
|
*/
|
||||||
exports.parseTiddler = function(title,options) {
|
exports.parseTiddler = function(title,options) {
|
||||||
options = $tw.utils.extend({},options);
|
options = options || {};
|
||||||
var cacheType = options.parseAsInline ? "inlineParseTree" : "blockParseTree",
|
var cacheType = options.parseAsInline ? "inlineParseTree" : "blockParseTree",
|
||||||
tiddler = this.getTiddler(title),
|
tiddler = this.getTiddler(title),
|
||||||
self = this;
|
self = this;
|
||||||
|
Loading…
Reference in New Issue
Block a user