On Monday, February 24, 2020 at 11:04:02 AM UTC-8, Mohammad wrote:
>
> Further input: It seems append does not work with tiddler have space in
> their name and it needs to get the input using double brackets when there
> is a space in title.
>
Instead of using:
<$action-listops $tiddler=<<newtag>> $field="list"
$subfilter="[enlist<order>] -[<actionTiddler>] +[append<actionTiddler>
putbefore<item>]" />
TiddlyTools/TOC now uses:
<$action-listops $tiddler=<<newtag>> $field="list"
$subfilter="[enlist<order>] -[<actionTiddler>] [<actionTiddler>] +[putbefore
<item>]" />
This avoids the use of the "append" filter (which expects a space separated
list) and instead, just explicitly appends the actionTiddler at the end,
then moves it into position
Similarly, when using "shift drop" (drop after), it now does:
<$action-listops $tiddler=<<newtag>> $field="list"
$subfilter="[enlist<order>] -[<actionTiddler>] [<actionTiddler>] +[putafter
<item>]" />
Also, I added handling to "ctrl drop" (drop into) so it works like the
other handlers and builds the full "order" while removing any "list-before"
or "list-after" fields on the individual entries:
<$set name="order" filter="[<item>tagging[]]">
<$list filter=<<order>>> <$action-deletefield $field="list-before"/>
<$action-deletefield $field="list-after"/> </$list>
<$action-listops $tiddler=<<actionTiddler>> $field="tags"
$subfilter="-[<oldtag>] [<item>]" />
<$action-listops $tiddler=<<oldtag>> $field="list"
$subfilter="-[<actionTiddler>]" />
<$action-listops $tiddler=<<item>> $field="list"
$subfilter="[enlist<order>] -[<actionTiddler>] [<actionTiddler>]" />
</$set>
With these code tweaks, TiddlyTools/TOC now handles drag-and-drop of
tiddlers with spaces in their titles.
Thank for all your help testing the various edge cases for TiddlyTools/TOC.
enjoy,
-e
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/5eff1a4d-26e7-4ad8-be8e-606fb73b9590%40googlegroups.com.