Query 101 -- Where is the Crib Sheet for Bracket & Quote marks?

574 views
Skip to first unread message

@TiddlyTweeter

unread,
Aug 4, 2018, 1:06:47 PM8/4/18
to TiddlyWiki
I can't admit I understand the complexity of "Brackets" (<> <<>> [] [[]] curly variants etc) or "Quotes" ("", ''  '', ''' ''' etc).

Is there a Crib Sheet that gives an overview of their variant use? They seem pretty important to understand well.

Josiah

David Gifford

unread,
Aug 4, 2018, 1:16:10 PM8/4/18
to TiddlyWiki
This causes me headaches, too. For example, from a creator standpoint it is pretty frustrating that filter="[tag[foo]]" in <$list> and filter:"[tag[foo]]" in <<list-links>> have to be different (= vs :).

@TiddlyTweeter

unread,
Aug 4, 2018, 2:31:18 PM8/4/18
to TiddlyWiki
There must be  a "logic" to the "bracket" and "quote" variants. I just can't find an overview of them anywhere.

TW "programming" looks quite simple, but It's not always clear what "level" you at. Grasping Brackets & Quote marks seem central to understanding it well

Mark S.

unread,
Aug 4, 2018, 3:56:36 PM8/4/18
to TiddlyWiki
By replying, we'll get about a half-dozen hits from people who will explain it better ;-)

The following is mostly true:

Inside of filter runs, use single <>,[],{}. The qualification is that the entire filter run has a real or implied set of square brackets:

    filter="Josiah David Mark" -- each name has an implied double bracket. So the same as

    filter="[[Josiah]] [[David]] [[Mark]]"

But if I Josiah, David, and Mark (a popular 1960s folk music group, I think) were names of variables, then the filter could look like:

    filter="[<Josiah>] [<David>] [<Mark>]"

But, outside of a filter run AND outside of a macro,  macros/variables need double <<>> :

    <<Josiah>> <<David>> & <<Mark>> lived by the sea ...

Inside of a macro, you can refer to macros with double brackets:

\define dragonpuff()
    <<Josiah>> <<David>> & <<Mark>> lived by the sea ...

or with variable placeholder notation :

\define dragonpuff()
    $(Josiah)$ $(David)$ & $(Mark)$ in the land of Sara-lee ...

Just to make things interesting, there is a new notation using double angle brackets for arguments inside of macros:

\define dragonlyric(item1 item2)
    And brought him <<__item1__>> and <<__item2__>> with a might puff!
 
You'll need to clarify what confuses you about quotes. Obviously I'm confused about who I'm quoting quite often ...


-- Mark

Mark S.

unread,
Aug 4, 2018, 4:06:23 PM8/4/18
to TiddlyWiki
By replying, we'll get about a half-dozen hits from people who will explain it better ;-)

Widgets pretend to be HTML tags, and use similar syntax. So "filter" gets assigned like an HTML style attribute:

<$list filter="[[If I had a Hummer]]" />

But macros are their own thing, and need the ":" (colon) when specifying parameters:

<<list-link filter:"[[I would Hummer in the Morning]]">>

of course, if you only have one parameter then it should be safe to omit the named parameter:

<<list-link "[[I would call out Ranger!]]">>

or you could just memorize the syntax for the <$macrocall> widget and always call it that way:

<$macrocall $name="list-link" filter="[[And drive all over this world!]]"/>

-- Mark

@TiddlyTweeter

unread,
Aug 5, 2018, 7:04:48 AM8/5/18
to TiddlyWiki
Thanks Mark S.

That is helpful. It need to absorb it and play a bit to really "get" it. The missing piece for me is still I can't quite grasp what "level" I'm at in each thing. The "bracketing thing" in TW seems unusual. Morphing syntax? I get confused because it almost behaves as if it were part of the "code", not just a convention for containing it.

I'm trying to take your notes and put them in a table such that the different combos begin to make logical sense. I'm not quite there yet. Give me a couple of months.

My emphasis below.

@TiddlyTweeter

unread,
Aug 5, 2018, 7:13:17 AM8/5/18
to TiddlyWiki
Mark S. ... But if I Josiah, David, and Mark (a popular 1960s folk music group, I think) were names of variables, then the filter could look like:

    filter="[<Josiah>] [<David>] [<Mark>]"

TBH, I really liked your & Dave's group: https://www.youtube.com/watch?v=aJiHVwLo6eo

I'm myself still at kindergarten stage: https://www.youtube.com/watch?v=dEynC3KdsJ0

@TiddlyTweeter

unread,
Aug 5, 2018, 7:28:22 AM8/5/18
to tiddl...@googlegroups.com
Footnote on a use case. You want to use a Regular Expression that uses a "class of characters" (e.g. [A-F0-9]). How can you get the square brackets interpreted correctly?

The documentation for TW does give a useful example of how to get  [whatever]  bracketed via $set value="regex pattern". I think that would work for anything where you need square brackets in the "content" of a filter etc?

<$set name="digit-pattern" value="[0-9]{2}">
<<list-links "[regexp:title
<digit-pattern>]">>
</$set>


Eric Shulman

unread,
Aug 5, 2018, 10:11:55 AM8/5/18
to TiddlyWiki
On Sunday, August 5, 2018 at 4:04:48 AM UTC-7, @TiddlyTweeter wrote:
That is helpful. It need to absorb it and play a bit to really "get" it. The missing piece for me is still I can't quite grasp what "level" I'm at in each thing. The "bracketing thing" in TW seems unusual. Morphing syntax? I get confused because it almost behaves as if it were part of the "code", not just a convention for containing it.

That is a good way to describe it.  The bracketing IS part of the code.  It tells the parser what *type* of reference it contains:

* square brackets contain literal tiddler title references (creates a link)
* angle brackets contain macro invocations (or variable references)
* curly braces contain tiddler transclusion references

There are two different contexts in which these brackets occur:
* in WikiText ("normal content")
* in filters (i.e., as parameters to widgets or macros)

In WikiText, the brackets are all DOUBLED.  This is to avoid confusion with other uses that may occur in normal text.  In particular, single angle brackets are used for normal HTML syntax, so macro invocation uses two angle brackets.  Similarly, though not as technically required, single square brackets and single curly braces are also doubled to avoid mistaken parsing of normal text content containing brackets as if they are macros or transclusions.

Similar to WikiText, the brackets in filter syntax depend upon the type of reference the contain.  However, the brackets do not need to be doubled, since within the filter there is no potential conflict with other usage.  Thus:

* SINGLE square brackets contain literal text values
* SINGLE angle brackets contain macro or variable references
* SINGLE curly braces contain tiddler transclusion references

Note: filters also use a pair of square brackets to contain separate filter expressions, for example:
   filter="[tag[foo]] -[tag[bar]]"
specifies TWO filter expressions.  The first filter expression selects all tiddlers tagged with "foo".  The second filter expression removes tiddlers tagged with "bar" from the results of the first filter (note the "-" preceding the expression... it reverses the meaning of the filter).

There's probably some more subtle details that I've left off, but hopefully the above explanation will get you past the initial learning curve.

enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki: The Missing Manuals

Mohammad

unread,
Aug 5, 2018, 10:24:23 AM8/5/18
to tiddl...@googlegroups.com
Thank you all!

Is it possible to put this somewhere in Tiddlywiki.com? Many of newbies and even intermediate programmers confuse with this!
I hope we could have a clear description of bracketing as part of TW manual or tutorial!

Mohammad


TonyM

unread,
Aug 5, 2018, 8:53:40 PM8/5/18
to TiddlyWiki

@TiddlyTweeter

unread,
Aug 6, 2018, 7:27:46 AM8/6/18
to TiddlyWiki
Thank you Eric!

Very helpful. My emphasis below.

Josiah

@TiddlyTweeter wrote:
... The "bracketing thing" in TW seems unusual... I get confused because it almost behaves as if it were part of the "code"...
 
Eric Shulman replied:

passingby

unread,
Aug 6, 2018, 10:37:37 AM8/6/18
to tiddl...@googlegroups.com
Eric wrote this somewhere and I copied and kept it in my TW. I ll paste this as it is (wikitext), so that you can copy and paste it in a tiddler: THANK YOU ERIC!


!! Types of Brackets

Brackets are used to indicate the ''type of operand'':

* `[]` - square brackets surround ''literal'' values, 
* `{}` - curly braces around ''field references'', 
* `<>` - angle brackets around ''variable names''.  

!! Single or Double Brackets - `<` vs `<<`
In TiddlyWiki ''content'', ''variables'' and ''macros'' are referenced using `<<variableName>>`.  The ''double''-bracket syntax is used to avoid conflicts with standard HTML syntax (i.e., `<b>` starts normal HTML bold formatting, while `<<b>>` embeds the value of a TiddlyWiki variable named "b").

However, ''within'' TiddlyWiki ''filters'', there is no need to double the brackets, as HTML is not allowed ''within'' the filter, so only single `<variableName>` is used.

Thus, inside a filter we can use a pair of ''single'' angle brackets, like this:

```
<$list filter="[is[current]!has<eachfield>]" variable=null>
```

!! Brackets within filters

<<<
Why I don't have to wrap `<fieldname>` with `[<fieldname>]` in a filter? 
<<<


Think of the brackets in filters as part of the operand itself rather than a "container" for the operand.  As explained above, the type of bracket indicates the type of operand being used:

* use `[...]` for ''literal'' values, e.g., `[texthere]`
* use `{...}` for ''field'' references, e.g., `{!!fieldname}`
* use `<...>` for ''variables'' e.g. `<currentTiddler>`

Thus, to split the literal text, "sometext", you could write: `[title[sometext]splitbefore[t]removesuffix[t]]`
you would get "some" as a result:

Ex: `<<list-links "[title[sometext]splitbefore[t]removesuffix[t]]">>`

<<list-links "[title[sometext]splitbefore[t]removesuffix[t]]">>

If the value "sometext" is stored in a field named "somefield" in the current tiddler, you could write: `[{!!somefield}splitbefore[t]removesuffix[t]]`

and, if the value "sometext" is stored in a variable named "somevariable", you could write: `[<somevariable>splitbefore[t]removesuffix[t]]`

As a slightly more complex example, suppose the value to split on was also stored in a variable.  Then you could write:
 `[<somevariable>splitbefore<othervariable>removesuffix<othervariable>]`

hope this helps,

enjoy,
-e
Eric Shulman

PS: I might also add, Eric is the best teacher when it comes to explaining code. 
Variables, Fields and Filters in TiddlyWiki.tid

Mohammad

unread,
Aug 6, 2018, 10:42:43 AM8/6/18
to TiddlyWiki
Hi Passingby!
I recommend to edit your post and attach a .tid file! Simply export this tiddler from your wiki name it like Type_of_brackets.tid and attached it to your post!

Best

passingby

unread,
Aug 6, 2018, 10:46:17 AM8/6/18
to TiddlyWiki
Thanks for the suggestion. I did it. 

Mohammad

unread,
Aug 6, 2018, 10:53:58 AM8/6/18
to tiddl...@googlegroups.com
Wonderful!
Thank you Passingby!

@TiddlyTweeter

unread,
Aug 7, 2018, 9:37:05 AM8/7/18
to TiddlyWiki
Ciao passingby

Again helpful. I think the more accurate "takes" on bracketing there are the more it gets easier to understand.

My emphasis & small edits.

Best wishes
Josiah


passingby wrote:
Eric wrote this somewhere and I copied and kept it in my TW. I ll paste this as it is (wikitext), so that you can copy and paste it in a tiddler: THANK YOU ERIC!

PS: I might also add, Eric is the best teacher when it comes to explaining code. 

@TiddlyTweeter

unread,
Aug 7, 2018, 1:31:29 PM8/7/18
to TiddlyWiki
Just adding a note to this thread on the v. 5.16 addition for https://tiddlywiki.com/#Macro%20Definitions%20in%20WikiText "Parameters As Variables"

TT: The one thing that I'd like to know is whether, in all contexts, you need  __underscore brackets__ to be "bracketed", i.e. does this construct always have to have "<<" or "<" etc. around it?

Jermolene...

The parameter name wrapped in double underscores is a valid variable name in its own right. When used in a filter it wouldn't have the double angle brackets:

<<link-links "[tag<__tagname__>!sort[modified]]">>

To put it another way: macro parameters are made available within the body of a macro as variables named with the parameter name wrapped in double underscores.

Mohammad

unread,
Aug 7, 2018, 1:48:48 PM8/7/18
to TiddlyWiki
Josiah!
 Thank you for this query! I see still the ", "", """ category is left! I appreciate if Eric or other experts explain this.

Mohammad

Jed Carty

unread,
Aug 7, 2018, 4:11:09 PM8/7/18
to TiddlyWiki
The only difference between ", """ and ' is what they match with. There are multiple options so that you can have " or ' inside a string literal. There is no difference in their meaning.

"" isn't used aside to indicate an empty string.

TonyM

unread,
Aug 7, 2018, 7:41:00 PM8/7/18
to TiddlyWiki
Jed et al..

Yes this is important, and I did not actually see why double doublequote is not there, thanks Jed

This is how I understand it.

=undelimited-name
='undelimited-name'
='delimited name'  ie space in name is a delimiter so need quotes
='' empty single quotes empty value
="delimited name" 
="" empty double quotes empty value
="""delimited name""" 

I believe the same is true when setting defaults in macros
\define macro-name(value:"value here" 2ndval)
I have not tested every case
and when calling macros

<<macro-name "value here">> based on position

<<macro-name 2ndval="value here">> based on name


The idea is a particular quote method allows anything but that quote method itself to exist between the quotes.

A good example is using wikify which is likely to have double quotes in it so we use """triple double-quotes so we can "quote" in here"""

With this specified a little more at https://tiddlywiki.com/#Filter%20Run and other places on tiddlywiki.com

Regards Tony

Mohammad

unread,
Aug 7, 2018, 10:46:18 PM8/7/18
to TiddlyWiki
Tony!
 I use triple quotes to create a paragraph in a list.
see below


* One
* """ Two 
This is a muliline item!
"""
* Third


Is there other uses and differences?

Mohammad

TonyM

unread,
Aug 7, 2018, 11:02:27 PM8/7/18
to TiddlyWiki
Mohammad,

That is a great tip. I suppose I was talking about when setting parameters, and your example is in WikiText.

But I will use that.

TonyM

unread,
Aug 7, 2018, 11:06:30 PM8/7/18
to TiddlyWiki
PS I note it honours the number bullets too.

# One
# """ Two
This is a muliline item!
"""
# Third

Mohammad

unread,
Aug 7, 2018, 11:43:59 PM8/7/18
to TiddlyWiki
Yes, you are right! By the way it is good to know where different type of quotes are used and what their role?

Mohammad

Mat

unread,
Aug 8, 2018, 7:11:21 AM8/8/18
to TiddlyWiki
@TiddlyTweeter wrote:

Is there a Crib Sheet that gives an overview of their variant use? They seem pretty important to understand well.


Here's a draft. If people make additions, corrections(!) etc, maybe it'll get good enough to be on tiddlywiki.com



<:-)
Shorthand syntax summary.json

Mohammad

unread,
Aug 8, 2018, 7:20:24 AM8/8/18
to TiddlyWiki
Good Job Mat!
 I will download the attached json and will make comments if any and return to you! I suggest other people do the same!

Thank you Mat

Mohammad

unread,
Aug 8, 2018, 7:23:55 AM8/8/18
to tiddl...@googlegroups.com
Mat!
 Do you want to have "good practice" examples by Jeremy for these shorthand syntax?
/Mohammad

@TiddlyTweeter

unread,
Aug 8, 2018, 9:08:19 AM8/8/18
to TiddlyWiki
Ciao Mat

The syntax ...

{{{filter}}}

... its not so clear what that does.

It is really good to see a near comprehensive table. I'm wondering if there could be one more column with a link to any working examples? Most get some coverage on TW.com?


Mat wrote:
Here's a draft. If people make additions, corrections(!) etc, maybe it'll get good enough to be on tiddlywiki.com

Best wishes
Josiah

Mat

unread,
Aug 8, 2018, 9:48:38 AM8/8/18
to TiddlyWiki
Mohammad wrote:
Mat!
 Do you want to have "good practice" examples by Jeremy for these shorthand syntax?

That's a rather general question. But if you just read the docs for most of them they do give examples or do you mean something else? Maybe the crib sheet should include links to the docs for the individual entries. I included the "lingo" to make it easier to find things in the docs. Besides, we ought to strive for a unified lingo. For example, I wasn't sure what that triple brace thingy was called.

<:-)

Jeremy Ruston

unread,
Aug 8, 2018, 9:55:27 AM8/8/18
to tiddl...@googlegroups.com
Hi Mat

I had a quick look and had a few thoughts:

* The table doesn’t distinguish between using a syntax as an attribute value vs. freestanding — for example, freestanding double curly brace transclusion will wikify the target tiddler, while attribute double curly brace transclusion will just return the raw text
* We should link to the docs for each wikitext construction shown
* The shorthand syntax misses out transclusions with the title omitted (ie. {{!!field}} and {{!!field||template}})
* The shorthand syntax distinguishes between <<macro>> and <<variable>> when they are actually the same thing
* The shorthand syntax doesn’t show named macro parameters
* The <<__parameter__>> example is a bit misleading because there are two things going on: the automatic conversion of a parameter into a variable name, and the usage of that variable name with the double angle bracket syntax. If a macro transcludes a tiddler than that tiddler would “see” the double underscored parameters just like any other inherited variable

Don’t be discouraged — it’s a great idea to present the options like this, it acts like another index on the underlying reference docs.

Best wishes

Jeremy.

--
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8632d1d0-162e-4e6d-9a9b-ae84dd165ee4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Shorthand syntax summary.json>

Mat

unread,
Aug 8, 2018, 9:59:26 AM8/8/18
to TiddlyWiki
@TiddlyTweeter wrote:

{{{filter}}}

... its not so clear what that does.

I think there is risk for conceptual confusion between tiddlers and titles (i.e title fields of tiddlers). I'm changing the description to be:

Transclude the titles from the filter output

Side note: for TWX (an imaginary future rehaul of TW) a syntax using only square brackets would be more intuitive, like: [[filter]] for example [[ [tag[foo]] ]].

 
It is really good to see a near comprehensive table. I'm wondering if there could be one more column with a link to any working examples?

I fear there may be factual errors in my table though. And possibly not quite consistent.

But, yes, links to the other docs.


<:-)

Mat

unread,
Aug 8, 2018, 12:39:12 PM8/8/18
to TiddlyWiki
I've updated the file. Anyone wanting to improve, feel free to jump in. I will not touch it more today.

A major difference is that I had to split up the table for readability.
I've also put in some (not all) links but note that these links assume presence of those tiddlers, as if it all were on tw .com.

I am unsure how to incorporate these aspects (BTW, good input @Jeremy) ...so anyone; please do jump in.



* The table doesn’t distinguish between using a syntax as an attribute value vs. freestanding — for example, freestanding double curly brace transclusion will wikify the target tiddler, while attribute double curly brace transclusion will just return the raw text
 
* The <<__parameter__>> example is a bit misleading because there are two things going on: the automatic conversion of a parameter into a variable name, and the usage of that variable name with the double angle bracket syntax. If a macro transcludes a tiddler than that tiddler would “see” the double underscored parameters just like any other inherited variable

 
<:-)
Shorthand syntax summary.json

Mohammad

unread,
Aug 12, 2018, 12:16:57 AM8/12/18
to TiddlyWiki
Thank you Mat!
Great effort!

One question when you pass a parameter using  """ (triple quotes) is it just meaning you want to pass anything (including quotes `, ", "")?

Mohammad 

TonyM

unread,
Aug 12, 2018, 1:07:11 AM8/12/18
to TiddlyWiki
Mohammad,

Yes that is what triple quotes is for and it can be a save strategy if you are allowing someone to enter a value before hand incase they include ( `, ", "")?

I also think it is important to know that if the value has no spaces other delimiters or quotes, it can be quote free eg  value=my-fieldname

Regards
Tony

PMario

unread,
Aug 12, 2018, 3:16:26 AM8/12/18
to TiddlyWiki
On Sunday, August 12, 2018 at 7:07:11 AM UTC+2, TonyM wrote:
I also think it is important to know that if the value has no spaces other delimiters or quotes, it can be quote free eg  value=my-fieldname

Yes, but that's a bit "dangerous" because value=my-fieldname is valid __but__ value=my/fieldname is NOT. It needs the quotes!

So don't be too lazy with single quotes. ... I personally did run into this problem quite a bit ;)

-m

TonyM

unread,
Aug 12, 2018, 4:04:56 AM8/12/18
to TiddlyWiki
Mario,

Ageed

I suspect of you know all the "spaces other delimiters or quotes" that break this you should be fine, like the / in your examples, but I am not so sure how common this is.

But Yes I only use it in the most rudimentary ways or for field-names or single words which must comply already, more often I go strait to "Double Quotes" unless I am doing something tricky

Regards
Tony

PMario

unread,
Aug 12, 2018, 4:41:17 AM8/12/18
to TiddlyWiki

On Sunday, August 12, 2018 at 10:04:56 AM UTC+2, TonyM wrote:
I suspect of you know all the "spaces other delimiters or quotes" that break this you should be fine, like the / in your examples, but I am not so sure how common this is.

I just wanted to point it out. ... because for my workflow it happens a lot.

- When I start developing a new functionality I use "visible" tiddlers eg: myTemplateName ... because they are easy to find.

- When I start converting the function into a plugin I use the plugin "namespace" eg: $:/plugins/wikilabs/xxx/myTemplateName   ....

I do a "find and replace" which sometimes leads to problems if I do forget about the "now missing" quotes ;)

-m

TonyM

unread,
Aug 12, 2018, 7:34:38 AM8/12/18
to TiddlyWiki
Mario,

I see what you are saying.

It is interesting how we develop different workflows. I now go direct to system tiddlers given a sidebar tab that lists recent system tiddlers with an edit button.

I often invoke a macro in the tiddler it is wriiten in, until Im happy and only then tag it as a global macro and test it in regular tiddlers.

It can be helpful sharing workflows we all develop independantly.

Regards
Tony

Mohammad

unread,
Jan 31, 2019, 11:08:37 PM1/31/19
to TiddlyWiki
Added to TW-Scripts.

Thanks Passinby and Eric.

--Mohammad

On Monday, August 6, 2018 at 7:07:37 PM UTC+4:30, passingby wrote:


On Saturday, August 4, 2018 at 11:06:47 AM UTC-6, @TiddlyTweeter wrote:
I can't admit I understand the complexity of "Brackets" (<> <<>> [] [[]] curly variants etc) or "Quotes" ("", ''  '', ''' ''' etc).


Is there a Crib Sheet that gives an overview of their variant use? They seem pretty important to understand well.

Josiah

Eric wrote this somewhere and I copied and kept it in my TW. I ll paste this as it is (wikitext), so that you can copy and paste it in a tiddler: THANK YOU ERIC!


!! Types of Brackets

Brackets are used to indicate the ''type of operand'':

* `[]` - square brackets surround ''literal'' values, 
* `{}` - curly braces around ''field references'', 
* `<>` - angle brackets around ''variable names''.  

!! Single or Double Brackets - `<` vs `<<`
In TiddlyWiki ''content'', ''variables'' and ''macros'' are referenced using `<<variableName>>`.  The ''double''-bracket syntax is used to avoid conflicts with standard HTML syntax (i.e., `<b>` starts normal HTML bold formatting, while `<<b>>` embeds the value of a TiddlyWiki variable named "b").

However, ''within'' TiddlyWiki ''filters'', there is no need to double the brackets, as HTML is not allowed ''within'' the filter, so only single `<variableName>` is used.

Thus, inside a filter we can use a pair of ''single'' angle brackets, like this:

```
<$list filter="[is[current]!has<eachfield>]" variable=null>
```

!! Brackets within filters

<<<
Why I don't have to wrap `<fieldname>` with `[<fieldname>]` in a filter? 
<<<


Think of the brackets in filters as part of the operand itself rather than a "container" for the operand.  As explained above, the type of bracket indicates the type of operand being used:

* use `[...]` for ''literal'' values, e.g., `[texthere]`
* use `{...}` for ''field'' references, e.g., `{!!fieldname}`
* use `<...>` for ''variables'' e.g. `<currentTiddler>`

Thus, to split the literal text, "sometext", you could write: `[title[sometext]splitbefore[t]removesuffix[t]]`
you would get "some" as a result:

Ex: `<<list-links "[title[sometext]splitbefore[t]removesuffix[t]]">>`

<<list-links "[title[sometext]splitbefore[t]removesuffix[t]]">>

If the value "sometext" is stored in a field named "somefield" in the current tiddler, you could write: `[{!!somefield}splitbefore[t]removesuffix[t]]`

and, if the value "sometext" is stored in a variable named "somevariable", you could write: `[<somevariable>splitbefore[t]removesuffix[t]]`

As a slightly more complex example, suppose the value to split on was also stored in a variable.  Then you could write:
 `[<somevariable>splitbefore<othervariable>removesuffix<othervariable>]`

hope this helps,

enjoy,
-e
Eric Shulman

Mohammad

unread,
Jan 31, 2019, 11:17:02 PM1/31/19
to TiddlyWiki
Added to TW-Scripts.
Thank you Mat.

A Gloom

unread,
Oct 9, 2019, 2:57:09 AM10/9/19
to TiddlyWiki
Rise! Rise from the backscroll you zombie post!  <.< >.>

This final draft of the crib sheet is the syntax shorthand tiddler at TWScripts?

If so can I steal it or the attached tid here for the References Collective demo I throwing into Searching High n Low to present a tool for the currnent user documentation initiative that has been brought up recently.

And if I can use it-- who all has added to it?  I have Eric as creator but also want to credit all who have improved it.

And Tony, I am lookin to docunap your pdf expanding upon Tobias'  Variables vs Parameters...

@TiddlyTweeter

unread,
Oct 9, 2019, 4:49:50 AM10/9/19
to TiddlyWiki
Ciao Gloom. 

Really nice to see good re-use of the past!

That was a very useful thread. Its as comprehensive as it gets on bracket & quotes syntax.

I'd check directly with Mohammad whether TWScripts fully reflects it.

TT
Reply all
Reply to author
Forward
0 new messages