mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 07:32:59 +00:00 
			
		
		
		
	Renamed 'handler' member of macros
Used to be called "code". And associated documentation changes
This commit is contained in:
		| @@ -15,7 +15,7 @@ exports.macro = { | ||||
| 	params: { | ||||
| 		text: {byPos: 0, type: "text", optional: false} | ||||
| 	}, | ||||
| 	code: function(type,tiddler,store,params) { | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 		if(type === "text/html") { | ||||
| 			return utils.htmlEncode(params.text); | ||||
| 		} else { | ||||
|   | ||||
| @@ -14,7 +14,7 @@ exports.macro = { | ||||
| 	types: ["text/html","text/plain"], | ||||
| 	params: { | ||||
| 	}, | ||||
| 	code: function(type,tiddler,store,params) { | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 		var encoder = type === "text/html" ? utils.htmlEncode : function(x) {return x;}, | ||||
| 			parseTree = store.parseTiddler(tiddler.fields.title); | ||||
| 		if(parseTree) { | ||||
|   | ||||
| @@ -41,7 +41,7 @@ exports.macro = { | ||||
| 		template: {byName: true, type: "tiddler", optional: true}, | ||||
| 		emptyMessage: {byName: true, type: "text", optional: true} | ||||
| 	}, | ||||
| 	code: function(type,tiddler,store,params) { | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 		var templateType = "text/x-tiddlywiki", | ||||
| 			templateText = "<<view title link>>", | ||||
| 			template = params.template ? store.getTiddler(params.template) : null, | ||||
|   | ||||
| @@ -16,7 +16,7 @@ exports.macro = { | ||||
| 		story: {byName: "default", type: "text", optional: false}, | ||||
| 		template: {byName: true, type: "text", optional: true} | ||||
| 	}, | ||||
| 	code: function(type,tiddler,store,params) { | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 		var tiddlers = store.getTiddlerText(params.story).split("\n"), | ||||
| 			t, | ||||
| 			output = []; | ||||
|   | ||||
| @@ -17,7 +17,7 @@ exports.macro = { | ||||
| 		target: {byName: "default", type: "tiddler", optional: false}, | ||||
| 		"with": {byName: true, type: "text", optional: true, dependentAll: true} | ||||
| 	}, | ||||
| 	code: function(type,tiddler,store,params) { | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 		if(params["with"]) { | ||||
| 			// Parameterised transclusion | ||||
| 			var targetTiddler = store.getTiddler(params.target), | ||||
|   | ||||
| @@ -14,7 +14,7 @@ exports.macro = { | ||||
| 	types: ["text/html","text/plain"], | ||||
| 	params: { | ||||
| 	}, | ||||
| 	code: function(type,tiddler,store,params) { | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 		return "5.0.0"; | ||||
| 	} | ||||
| }; | ||||
|   | ||||
| @@ -17,7 +17,7 @@ exports.macro = { | ||||
| 		format: {byPos: 1, type: "text", optional: true}, | ||||
| 		template: {byPos: 2, type: "text", optional: true} | ||||
| 	}, | ||||
| 	code: function(type,tiddler,store,params) { | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 		var v = tiddler.fields[params.field], | ||||
| 			encoder = type === "text/html" ? utils.htmlEncode : function(x) {return x;}; | ||||
| 		if(v) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston