mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 15:42:59 +00:00 
			
		
		
		
	Fix importing of function definitions
This commit is contained in:
		| @@ -55,9 +55,11 @@ ImportVariablesWidget.prototype.execute = function(tiddlerList) { | ||||
| 						type: "set", | ||||
| 						attributes: parseTreeNode.attributes, | ||||
| 						params: parseTreeNode.params, | ||||
| 						isMacroDefinition: parseTreeNode.isMacroDefinition | ||||
| 						variableParams: parseTreeNode.variableParams, | ||||
| 						isMacroDefinition: parseTreeNode.isMacroDefinition, | ||||
| 						isFunctionDefinition: parseTreeNode.isFunctionDefinition | ||||
| 					}; | ||||
| 					if (parseTreeNode.isMacroDefinition) { | ||||
| 					if (parseTreeNode.isMacroDefinition || parseTreeNode.isFunctionDefinition) { | ||||
| 						// Macro definitions can be folded into | ||||
| 						// current widget instead of adding | ||||
| 						// another link to the chain. | ||||
|   | ||||
| @@ -0,0 +1,29 @@ | ||||
| title: CustomWidget-Override-Codeblock | ||||
| description: Usage of genesis widget with attributes starting with dollar signs | ||||
| type: text/vnd.tiddlywiki-multiple | ||||
| tags: [[$:/tags/wiki-test-spec]] | ||||
|  | ||||
| title: Output | ||||
|  | ||||
| \whitespace trim | ||||
| \import Definition | ||||
| <$codeblock code="Kangaroo"/> | ||||
| <$codeblock code={{Subject}}/> | ||||
| <$let test="Tiger"> | ||||
| <$codeblock code=<<test>>/> | ||||
| </$let> | ||||
| _ | ||||
| title: Definition | ||||
|  | ||||
| \whitespace trim | ||||
| \function <$codeblock>(code) | ||||
| <$codeblock code={{{ [<code>addprefix[£]addsuffix[@]] }}}/> | ||||
| \end | ||||
| _ | ||||
| title: Subject | ||||
|  | ||||
| Python | ||||
| _ | ||||
| title: ExpectedResult | ||||
|  | ||||
| <p><pre><code>£Kangaroo@</code></pre><pre><code>£Python@</code></pre><pre><code>£Tiger@</code></pre></p> | ||||
		Reference in New Issue
	
	Block a user
	 jeremy@jermolene.com
					jeremy@jermolene.com