mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 07:32:59 +00:00 
			
		
		
		
	Rename render function of macros
This commit is contained in:
		| @@ -15,7 +15,7 @@ exports.macro = { | ||||
| 	params: { | ||||
| 		text: {byPos: 0, type: "text", optional: false} | ||||
| 	}, | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 	render: function(type,tiddler,store,params) { | ||||
| 		if(type === "text/html") { | ||||
| 			return utils.htmlEncode(params.text); | ||||
| 		} else { | ||||
|   | ||||
| @@ -17,7 +17,7 @@ exports.macro = { | ||||
| 		text: {byName: true, type: "text", optional: true}, | ||||
| 		alignment: {byName: true, type: "text", optional: true} | ||||
| 	}, | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 	render: function(type,tiddler,store,params) { | ||||
| 		if(type === "text/html") { | ||||
| 			if(store.tiddlerExists(params.src)) { | ||||
| 				if(params.text) { | ||||
|   | ||||
| @@ -15,7 +15,7 @@ exports.macro = { | ||||
| 	params: { | ||||
| 		info: {byName: "default", type: "text", optional: false} | ||||
| 	}, | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 	render: function(type,tiddler,store,params) { | ||||
| 		var encoder = type === "text/html" ? utils.htmlEncode : function(x) {return x;}, | ||||
| 			info = params.info || "parsetree"; | ||||
| 		if(tiddler) { | ||||
|   | ||||
| @@ -16,7 +16,7 @@ exports.macro = { | ||||
| 	params: { | ||||
| 		target: {byName: "default", type: "tiddler", optional: false} | ||||
| 	}, | ||||
| 	handler: function(type,tiddler,store,params,content) { | ||||
| 	render: function(type,tiddler,store,params,content) { | ||||
| 		if(type === "text/html") { | ||||
| 			return utils.stitchElement("a",{ | ||||
| 				href: params.target | ||||
|   | ||||
| @@ -41,7 +41,7 @@ exports.macro = { | ||||
| 		template: {byName: true, type: "tiddler", optional: true}, | ||||
| 		emptyMessage: {byName: true, type: "text", optional: true} | ||||
| 	}, | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 	render: function(type,tiddler,store,params) { | ||||
| 		var templateType = "text/x-tiddlywiki", | ||||
| 			templateText = "<<view title link>>", | ||||
| 			template = params.template ? store.getTiddler(params.template) : null, | ||||
|   | ||||
| @@ -18,7 +18,7 @@ exports.macro = { | ||||
| 		label: {byPos: 2, type: "text", optional: false}, | ||||
| 		tooltip: {byPos: 3, type: "text", optional: true} | ||||
| 	}, | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 	render: function(type,tiddler,store,params) { | ||||
| 		if(type === "text/html") { | ||||
| 			return utils.stitchSlider(type, | ||||
| 										params.label, | ||||
|   | ||||
| @@ -16,7 +16,7 @@ exports.macro = { | ||||
| 		story: {byName: "default", type: "tiddler", optional: false}, | ||||
| 		template: {byName: true, type: "tiddler", optional: true} | ||||
| 	}, | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 	render: function(type,tiddler,store,params) { | ||||
| 		var tiddlers = store.getTiddlerText(params.story).split("\n"), | ||||
| 			t, | ||||
| 			output = []; | ||||
|   | ||||
| @@ -53,7 +53,7 @@ exports.macro = { | ||||
| 		template: {byName: true, type: "tiddler", optional: true}, | ||||
| 		"with": {byName: true, type: "text", optional: true, dependentAll: true} | ||||
| 	}, | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 	render: function(type,tiddler,store,params) { | ||||
| 		var renderTitle = params.template, | ||||
| 			renderAs = params.target; | ||||
| 		// Slightly bewildering logic to sort out the optional parameters | ||||
|   | ||||
| @@ -14,7 +14,7 @@ exports.macro = { | ||||
| 	types: ["text/html","text/plain"], | ||||
| 	params: { | ||||
| 	}, | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 	render: 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} | ||||
| 	}, | ||||
| 	handler: function(type,tiddler,store,params) { | ||||
| 	render: function(type,tiddler,store,params) { | ||||
| 		var encoder = type === "text/html" ? utils.htmlEncode : function(x) {return x;}; | ||||
| 		if(!tiddler) { | ||||
| 			return "{{** Missing tiddler **}}"; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston