One of the side projects I’ve been working on off and on is a quick and easy way to create dossiers for my story’s characters, i.e. like a wiki page for the character like what you would see if you went to a website like Fandom.
I had the initial design and layout done, but one of the things that I never figured out, was listing fields that contain double square brackets and showing them as links, while leaving the rest as plaintext.
For instance, if I have a tiddler titled “Johnny J. Doe” and the text field contains:
\define systemFields() draft.title draft.of title tags text created creator modified modifier
<table class="tc-max-width">
<tbody>
<$list filter="[all[current]fields:exclude<systemFields>sort[]]" variable="selectedFields">
<tr>
<th> <$text text={{{ [<selectedFields>] }}}/> </th>
<td> {{{ [all[current]get<selectedFields>] }}} </td>
</tr>
</$list>
</tbody>
</table>
with the fields:
birth-date: 04/04/2004
birth-parents: [[Samual Doe]] [[Madison Doe]]
birth-place: [[Nowhere, Colorado, USA]]
birth-name: [[Johnathan James Doe|Johnny J. Doe]]
expiration-date: 04/04/2084
expiration-place: [[Home, Pennsylvania, USA]]
How can I set it so that the text itself shows as plaintext, but if it is wrapped in double square brackets, it renders as links instead?
I attempted to do this with enlisting it but I was unable to get it working. Any attempt to use enlist resulted in the fields not appearing.