On Wednesday, 9 January 2019 16:01:43 UTC+1, Mark S. wrote:
>
> When you say "squashed into a single blank" do you mean the appearance, or
> how many blanks you see when you open the tiddler?
>
> TW displays via HTML, and HTML will take an infinite number of spaces and
> squash them down to one. The old rule of two spaces after a period kind of
> died in the HTML world.
>
I see - I'm using the node.js server -- the tiddler name has some embedded
blanks
I assume the "[[" ..."]]" are added since the name contains blanks and
follows the usual convention for
placing links with blanks inside brackets.
One thing I hadn't noticed was that blanks in titles get squashed in the
display but not when editing
So if you create two tiddlers called "My Page" and "My Page" (with two
blanks) both appear
identical when display - they both look the same in the recent tab - but
they are different.
I guess the rule is "beware of double blanks in titles"
>
> But if you edit the tiddler, the spaces are still there. Actually, when I
> ran your example, something weirder occurred. The spaces were replaced with
> exactly 17 spaces. I'm thinking it's some sort of unicode translation error
> that may vary by platform.
>
> I do not get the square brackets [ ], so that may be a platform thing too.
>
> The number on the end is expected. When you use action-create tiddler it
> generates a new number to make sure that all new tiddlers are unique.
>
> What browser and platform are you using?
>
The node version 5.1.19-prerelease - in chrome browser
>
> Have fun,
>
I am - slowly digging deeper.
So am I right in thinking that
<$button actions={{Tiddler}} ..>...
The documentation said action is a string containing actionwidgets
So {{Tiddler}} must mean "the string formed from the contents of Tiddler"
I suppose
I think I'm ok with this now.
Thanks
/Joe
> -- Mark
>
> On Wednesday, January 9, 2019 at 6:31:16 AM UTC-8, Joe Armstrong wrote:
>>
>> I'm trying to understand the comment code plugin at
>>
>> https://github.com/Jermolene/TiddlyWiki5/tree/master/plugins/tiddlywiki/comments
>>
>> So I've been cutting and pasting trying to create a minimal example
>>
>> I'm now down to two tiddlers:
>>
>> One is a test tiddler which contains
>> this:
>>
>> <$button actions={{CommentButtonActions}}>
>> Press Me To add a comment
>> </$button>
>>
>> Then CommentButtonActions contains this:
>>
>> <$action-createtiddler
>> $basetitle = "My Comment"
>> text="yes"/>
>>
>> When I click on the button a tiddler called
>>
>> [[My Comment]] is created
>>
>> If I click again a tiddler called
>>
>> [[My Comment]] 1 is created
>>
>> My understanding of the createtiddler was that $basetitle was the
>> tiddler name - but somehow the (deliberate) blanks in the string
>> got squashed into a single blank some extra square brackets "[[" and
>> "]]" appeared by magic and a sequence number got appended.
>>
>> The documentation of "actions" in $button says that actions is a string
>> ...
>> so I guess it's my own fault for saying actions = {{...}} -- but this does
>> work in the comments example at GitHub -- the problem is that I haven't a
>> clue
>> what it means.
>>
>> So can anybody enlighten me?
>>
>> Supplementary question. When I make my first button and pressed it
>> nothing happened - I'd expected some code to be executed - how do I debug
>> this?
>>
>>
>> Cheers
>>
>> /Joe
>>
>
--
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 [email protected].
To post to this group, send email to [email protected].
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/f4de5eee-0b05-4cb8-a6bb-ea9ad6689cfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.