I am Curious about this code

122 views
Skip to first unread message

TonyM

unread,
Oct 10, 2019, 2:55:06 AM10/10/19
to TiddlyWikiDev
Hi,

If you have a look at the tiddler 

$:/themes/tiddlywiki/vanilla/sticky content below

There is some interesting use of a reveal containing wikitext wrapped in double backticks

and the use of single backtick inside a list widget.

Is there someone who knows what is occurring here able to give a narrative explanation, especialt what happens to the backticks? 

I am very intrigued.

<$reveal state="$:/themes/tiddlywiki/vanilla/options/stickytitles" type="match" text="yes">
``
.tc-tiddler-title {
position: -webkit-sticky;
position: -moz-sticky;
position: -o-sticky;
position: -ms-sticky;
position: sticky;
top: 0px;
background: ``<<colour tiddler-background>>``;
z-index: 500;
}

``
<$list filter="[range[100]]">
`.tc-story-river .tc-tiddler-frame:nth-child(100n+`<$text text=<<currentTiddler>>/>`) {
z-index: `<$text text={{{ [[200]subtract<currentTiddler>] }}}/>`;
}
`
</$list>
</$reveal>

Thanks in advance
Tony

Mohammad

unread,
Oct 11, 2019, 1:27:02 AM10/11/19
to TiddlyWikiDev
I am curious too!

Jeremy Ruston

unread,
Oct 14, 2019, 10:21:55 AM10/14/19
to tiddly...@googlegroups.com
The only special trick in that example is the use of double backticks to delineate a run of monospaced text. Using double backticks allows single backticks to occur in the intervening text.

Best wishes

Jeremy


On 11 Oct 2019, at 06:27, Mohammad <mohammad...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/d0650a30-3e84-4e50-9026-fda463345795%40googlegroups.com.

Mohammad

unread,
Oct 21, 2019, 12:42:27 AM10/21/19
to TiddlyWikiDev


On Monday, October 14, 2019 at 5:51:55 PM UTC+3:30, Jeremy Ruston wrote:
The only special trick in that example is the use of double backticks to delineate a run of monospaced text. Using double backticks allows single backticks to occur in the intervening text.

Best wishes

Jeremy
To unsubscribe from this group and stop receiving emails from it, send an email to tiddly...@googlegroups.com.

TonyM

unread,
Oct 21, 2019, 8:35:42 PM10/21/19
to TiddlyWikiDev
Jeremy et all,

I understand the use of nested delimiters. I expect the full answer I was looking for relates to how the content is transcluded into the theme as  Tiddler styles
{{$:/themes/tiddlywiki/vanilla/sticky}}

Basically behind the reveal is conditional styling and a list widget. Somehow the backticks are allowing literal text to be included in the theme then interpreted as css or wiki text.

There is a code pattern here, that seems quite powerful, and I still don't fully understand it.

Regards
Tony

TonyM

unread,
Oct 21, 2019, 8:38:53 PM10/21/19
to TiddlyWikiDev
Post script,

I speculate this code pattern points to a method that allows one to possibly transclude litteral code in another tiddler without it being wikified first. Understanding this may allow me to programmatically generate tiddlers containing generated macros and wikitext.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages