Read below or first take a look at...
Starting from tiddlers like...
- BookB
- BookB / ChapterC
- BookB / ChapterC / PageP
I am trying to display a list at the bottom of BookB
showing the "subtiddlers" based on BookB functioning as a prefix.
While that's easy to achieve using [prefix<<currentTiddler>>],
I am now trying to remove "BookB / " from BookB / ChapterC so as to
construct a link that reads [[ChapterC|BookB / ChapterC]]
To do that, I introduced $:/config/ChapterDelimiter and
specifyied " / " as the delimiter to then
concatenate the current tiddler as my prefix with it using $set, all in all...
<$list filter="[prefix<currentTiddler>sort[title]]-[<currentTiddler>]" variable="sub">
<$set variable="remove" value="<<currentTiddler>>{{$:/config/ChapterDelimiter}}">
<$list filter="[<sub>removeprefix<remove>]" variable="truncated">
<$link to=<<sub>>><<truncated>></$link><br>
</$set>
</$list>
</$list>
The problem is, I never reach the inner list, i.e. the remove variable just won't yield the desired filter.
The problem must lie in the variable as it all works if I do it with simple strings...
I also noticed that when I save my delimiter $:/config/ChapterDelimiter as " / " and then transclude it via...
{{$:/config/ChapterDelimiter}}
...then the leading <blank> is trimmed! This definitely appears to be a bug.
Best wishes, Tobias.