Is this a bug in filtered transclusion I am seeing on TiddlyWIki.com?

I was testing some date manipulation to finalise some documentation on tiddlywiki.com

Place the following in a new tiddler and save;

{{{ [all[current]get[created]format:date[0hh:0mm 0DD-0MM-YYYY]] }}}
{{{ [all[current]get[created]format:date[0hh:0mm 0DD-0MM-YYYY]] }}}

We get;

Snag_40f888a6

  • You will see two dates one on each row
  • Could we expect then to appear on a single line?

Now edit the above tiddler and do nothing but “add a space character at the end of the first line” and save, this will be the result;

Snag_40f7bbff

It can be observed further down such as this example;

:Content

{{{ [all[current]get[created]format:date[0hh:0mm 0DD-0MM-YYYY]] }}} <space 
{{{ [all[current]get[created]format:date[0hh:0mm 0DD-0MM-YYYY]] }}}

Snag_41010b7b

But place <hr>in the empty line and it behaves as expected

:Content
<hr>
{{{ [all[current]get[created]format:date[0hh:0mm 0DD-0MM-YYYY]] }}} <space 
{{{ [all[current]get[created]format:date[0hh:0mm 0DD-0MM-YYYY]] }}}

Snag_410207ae

  • See how it also appends the two rows as I would have expected in the above examples working or otherwise?

I would be happy to raise an issue but I am not actually sure how to describe this Yet;

Reproduced on TiddlyWiki.com and current empty.html -

  • On Windows 11,
  • And these browsers Chrome, edge and FireFox (all standard release)

I can confirm this. Strangely using bullet list or putting the two line in triple double quotes can handle space! It seems the parser has some issues

Yes. Different things impact it differently so I did not know how to issolate the problem. One of the core devs may see it for exactly what it is.

However even this minimal case has a problem and tge cobsequence can be seen in the hrml preview on tiddlywiki.com

‘{{{ [[test]] }}} {{{ [[test]] }}}’

Gives

<div><a class="tc-tiddlylink tc-tiddlylink-missing" href="#%7D%7D%7D">}}}</a></div><div><a class="tc-tiddlylink tc-tiddlylink-missing" href="#%7B%7B%7B">{{{</a></div><div><a class="tc-tiddlylink tc-tiddlylink-missing" href="#test">test</a></div>

The triple brace syntax for filtered transclusion works differently according to whether it is invoked in “block mode” or “inline mode”.

Block mode is triggered if the transclusion appears at the start of a block and is immediately followed by a line break. Otherwise the transclusion will be rendered in inline mode.

In block mode, the output is displayed as one link per line. In inline mode, the output is squooshed together into a single line. Inline mode is more useful when using a template.

1 Like

Thank you Jeremy!
Then one can expect an output in inline or block mode! but why above example returns an empty triple braces when inline mode is triggered by adding a space to first line? E.g

{{{ [all[current]get[created]format:date[0hh:0mm 0DD-0MM-YYYY]] }}} space 
{{{ [all[current]get[created]format:date[0hh:0mm 0DD-0MM-YYYY]] }}}

returns

}}}
space
{{{
14:52 06-06-2022

while

14:52 06-06-2022 space 14:52 06-06-2022

is expected .

Still occurring; Tw5.2.2 and 5.2.3

  • Although it may be related to what you said here. It is a clear bug. Please try this on tiddlywiki.com
\define twds-format() [UTC]YYYY0MM0DD0hh0mm0ss0XXX

{{{ [[20220101]format:date[]] }}} 

{{{ [[20220101]format:date<twds-format>] }}}

Results in;

2022 1 1 11:00
}}}
{{{
20220101000000000
  • With each line forming a wiki-link to a tiddler as per that displayed.

If you fiddle you get different outcomes many of which are not what someone is “asking for” eg;

  • add anything to the beginning of the line anything {{{ [[20220101]format:date[]] }}}
  • and repeat {{{ [[20220101]format:date[]] }}} with and without a blank line between them.

There is a bug at GH: https://github.com/Jermolene/TiddlyWiki5/issues/2109 … It’s an older one. IMO the issue discussion did suggest some hints for a fix.

The problem here is that there is a space character immediately after {{{ [[20220101]format:date[]] }}}; remove it and the result is as expected. I agree that it’s confusing behaviour; see my explanation above for why it occurs.