Closed kookma closed 2 weeks ago
@linonetwo could you please have a look? I suspect we need handling for text references in the traversal of the parse tree.
Another bug
I suggest that the transcludes filter operator should works like link. The current implementation is problematic. It should not recognize soft transclusions like
<$tiddler tiddler="One">
<$transclude $tiddler />
</$tiddler>
<<list-links "[all[current]transcludes[]]">>
Strangely the below does not work
<$tiddler tiddler="One">
<$transclude $tiddler=<<currentTiddler>> />
</$tiddler>
<<list-links "[all[current]transcludes[]]">>
I propose only these forms shall be recognized:
{{mtTid}}
{{myTid||yourtemplate}}
{{myTid!!thatfield}}
{{myTid##thatindex}}
This {{!!myfield}}
does not make sense, if it refers to host tiddler, then we do not need it
If it refers to another tiddler, then some script is needed like <$tiddler tiddler=...
or <$list filter="..." > ....
Thanks for testing, I should ignore the case where target tiddler is empty.
@linonetwo
The below returns One, but it should not! Do you think this is an error with <$transclude $tiddler />
<$tiddler tiddler="One">
<$transclude $tiddler />
</$tiddler>
<<list-links "[all[current]transcludes[]]">>
This one returns nothing
<$tiddler tiddler="One">
<$transclude />
</$tiddler>
<<list-links "[all[current]transcludes[]]">>
Thank you @kookma I really appreciate the work you're putting into testing this, very helpful!
The below returns One, but it should not! Do you think this is an error with
<$transclude $tiddler />
<$tiddler tiddler="One"> <$transclude $tiddler /> </$tiddler> <<list-links "[all[current]transcludes[]]">>
This bug also exists with backtranscludes
operator. So, if in tiddler One you put <<list-links "[all[current]backtranscludes[]]">>
where the above code in in Tiddler Test, you get Text as backtransclude, but you should not get such answer!
@kookma Comparing with backlinks operator, and tagging operator, maybe we still need to include the tiddler itself. Maybe it will be useful someday? And user can always -[<currentTiddler>]
from it.
@kookma Comparing with backlinks operator, and tagging operator, maybe we still need to include the tiddler itself. Maybe it will be useful someday? And user can always
-[<currentTiddler>]
from it.
Well, from bidirectional note taking point of view, refereeing to itself makes no sense to me! but let's what other says.
Describe the bug
The
transcludes
filter operator causes a RSOD when a tiddler contains transcluding text references like{{!!title}}
or{{!!created}}
Expected behavior
The
transclude
filter operator shall handle correctly the{{!!any-field}}
To Reproduce
<$list filter="[all[current]transcludes[]]">
</$list>
{{New Tiddler!!created}}
<$list filter="[all[current]transcludes[]]">
</$list>