mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-03-12 17:51:58 -07:00
* fix: correctly resolve functions in text substitutions * docs: added changenote * fix: remove commented code
38 lines
No EOL
907 B
Text
38 lines
No EOL
907 B
Text
title: Functions/FunctionResolutionInSubstitute
|
|
description: Functions should resolve correctly in the substitute operator
|
|
type: text/vnd.tiddlywiki-multiple
|
|
tags: [[$:/tags/wiki-test-spec]]
|
|
|
|
title: Output
|
|
|
|
\whitespace trim
|
|
|
|
\function getIndex() [<index>add[1]]
|
|
|
|
\procedure template-with-var() $(getIndex)$
|
|
|
|
\procedure template-with-filteredexpression() ${ [<getIndex>] }$
|
|
|
|
\function test-with-substitute-variable()
|
|
[[abc]split[]] :map[<template-with-var>substitute[]] :and[join[ / ]]
|
|
\end
|
|
|
|
\function test-with-substitute-filteredexpression()
|
|
[[abc]split[]] :map[<template-with-filteredexpression>substitute[]] :and[join[ / ]]
|
|
\end
|
|
|
|
\function test-with-function()
|
|
[[abc]split[]] :map[function[getIndex]substitute[]] :and[join[ / ]]
|
|
\end
|
|
|
|
|
|
|
|
<<test-with-substitute-variable>>|
|
|
<<test-with-substitute-filteredexpression>>|
|
|
<<test-with-function>>
|
|
|
|
|
|
+
|
|
title: ExpectedResult
|
|
|
|
<p>1 / 2 / 3|1 / 2 / 3|1 / 2 / 3</p> |