mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-19 18:59:42 +00:00
aa4aeb187c
* fix: functions should use variables set by filter runs * refactor: code clean up * chore: added more tests
24 lines
708 B
Plaintext
24 lines
708 B
Plaintext
title: Functions/FunctionFilterrunVariables
|
|
description: Functions in filter runs that set variables
|
|
type: text/vnd.tiddlywiki-multiple
|
|
tags: [[$:/tags/wiki-test-spec]]
|
|
|
|
title: Idiosyncrasy
|
|
caption: Idiosyncrasy Caption Field
|
|
|
|
+
|
|
title: Output
|
|
|
|
\whitespace trim
|
|
\procedure demo-subfilter() [<currentTiddler>]
|
|
\function .demo-function() [<currentTiddler>]
|
|
|
|
<$let currentTiddler="Idiosyncrasy">
|
|
<$text text={{{ [<currentTiddler>get[caption]!is[blank]else<currentTiddler>] :map[subfilter<demo-subfilter>] }}}/>,
|
|
<$text text={{{ [<currentTiddler>get[caption]!is[blank]else<currentTiddler>] :map[.demo-function[]] }}}/>
|
|
</$let>
|
|
|
|
+
|
|
title: ExpectedResult
|
|
|
|
<p>Idiosyncrasy Caption Field,Idiosyncrasy Caption Field</p> |