[TW5] Behaviour of the list-links macro with camelcase caption field value

105 views
Skip to first unread message

FrD

unread,
Oct 3, 2015, 11:57:27 AM10/3/15
to TiddlyWiki
Hi,

When using the list-links macro, I found a strange behaviour in some cases.

Say you put this in TiddlerA :

<<list-links filter:"[tag[foo]]">>

And you have some tiddlers tagged "foo".
For one of them, say "test3" you define a caption field with value "TestThree".

The list-links macro lists this tiddler under the name : TestThree but doesn't link to "test3" but to the non-existent tiddler "TestThree".

If you put ~TestThree in the caption field, it works as expected.


FrD

Jeremy Ruston

unread,
Oct 3, 2015, 1:01:09 PM10/3/15
to tiddl...@googlegroups.com
Hi FrD


As you know, the caption field, if present, is wikified by the list-links macro in preference to displaying the unwikified “title” field. The title TestThree is CamelCase, and so it is automatically made into a link to that tiddler, embedded within the expected link.

So, there may be two unexpected things going on: that the caption field is wikified, and that links can be nested.

Best wishes

Jeremy.




FrD

--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f15a07b5-9005-4f5d-b626-1596f3fd8caf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

FrD

unread,
Oct 3, 2015, 1:18:40 PM10/3/15
to TiddlyWiki
Hi Jeremy,

Thanks for your quick answer.
It makes sense.

But it's somewhat disconcerting to have a link which is displayed among the others and doesn't work.
I'll take care to use non camelcase captions or to escape them with ~.

FrD

Tobias Beer

unread,
Jan 4, 2016, 2:35:45 AM1/4/16
to TiddlyWiki
Hi Jeremy / FrD,

So, there may be two unexpected things going on: that the caption field is wikified, and that links can be nested.

I find this to be problematic as well, but I understand how the caption needs transcludability for translation purposes. 

But it's somewhat disconcerting to have a link which is displayed among the others and doesn't work.
I'll take care to use non camelcase captions or to escape them with ~.

There are several ways to remedy the problem, assuming that the caption field is always transcluded:
  1. escape a simple caption using caption: ~SomeCaption
  2. use some wikitext markup to just output text, e.g. caption: <$text text={{SomeDictionary##some-index}}/>
    • especially when retrieving the caption from elsewhere
      • so you would't know if it contained any camelcased content
Best wishes,

Tobias.
Reply all
Reply to author
Forward
0 new messages