issue in append operator

53 views
Skip to first unread message

Mohammad

unread,
Feb 24, 2020, 2:15:00 PM2/24/20
to tiddl...@googlegroups.com
the append operator is used to add items to a list field.

It seems it has a bug

to reproduce

  • go to https://tiddlywiki.com/
  • create two tiddlers with spaces in their title, and tag them with uuu like
    • Nella Routini
    • Stella Barouni
  • Next create a tiddler called kk with a list filed contains aa bb cc
  • Next in another tiddler paste the below code
  • Save and click on the button
  • check the result. It is expected to have [[Nella Routini]] in the list field of kk, but you see no [[]] and it means the append added two separate tiddlers Nella and Routini NOT [[Nella Routini]]

--Mohammad

Mohammad

unread,
Feb 24, 2020, 2:28:36 PM2/24/20
to TiddlyWiki

TonyM

unread,
Feb 24, 2020, 5:46:25 PM2/24/20
to TiddlyWiki
Mohammad,

Without testing this can I suggest perhaps you are adding the string "Nella Routini" rather than delimiting it as a tiddler title, this the space is taken as the delimiter between tiddlers. 

Perhaps append the currentTiddler using a macro variable defined as [[$(currentTiddler)$]] 

Regards
Tony

PMario

unread,
Feb 24, 2020, 7:30:06 PM2/24/20
to TiddlyWiki
On Monday, February 24, 2020 at 8:15:00 PM UTC+1, Mohammad wrote:
the append operator is used to add items to a list field.

It seems it has a bug


The purpose text says: "append a range of items from an array to the list"  ... So your <currentTiddler> is interpreted as a "space separated list" ... That's by intention.

-mario


Mohammad

unread,
Feb 24, 2020, 10:11:23 PM2/24/20
to TiddlyWiki
Hi Mario,
 This is quite confusing!

While the insertbefore, putafter, putbefore,... all works with tiddler title and respects the space in title, this one does not!
Also, Tiddlywiki works in first place with tiddlers (title) so one expects append respects this rule!

--Mohammad

Mohammad

unread,
Feb 24, 2020, 10:28:07 PM2/24/20
to TiddlyWiki
Hi Tony!


On Tuesday, February 25, 2020 at 2:16:25 AM UTC+3:30, TonyM wrote:
Mohammad,

Without testing this can I suggest perhaps you are adding the string "Nella Routini" rather than delimiting it as a tiddler title, this the space is taken as the delimiter between tiddlers. 

The $list works as expected, so it list tiddlers with tag "uuu"!

I understand from previous discussions Tiddlywiki grow organically, e.g. by feature request by users! So, it does not have a big picture for scripting grammar (syntax) to keep everything consistent! Only the new features shall keep the backward compatibility! that is why there are so many exceptions and the scripting grammar has such strange diversity!



Perhaps append the currentTiddler using a macro variable defined as [[$(currentTiddler)$]] 

I did the same!
Reply all
Reply to author
Forward
0 new messages