On Sunday, March 4, 2018 at 4:52:18 PM UTC+1, joearms wrote: > > ... > I found this code: (it's as is and unformatted since I > don't know when I can add white space or even line feeds) > > > \define journalButton() > <$button tooltip={{$:/language/Buttons/NewJournal/Hint}} > aria-label={{$:/language/Buttons/NewJournal/Caption}} > class=<<tv-config-toolbar-class>>> >
First off all: *Whitespace matters* - but not always! That's one reason, that makes advanced TW UI based syntax "a nightmare". That's a very early decision, which makes sense for "plain text" writers. -> Standard users. But for developers, it makes live much harder, since you basically need to know the parsing rules, by heart. Which is kind of impossible. In "user-mode" separating 2 paragraphs only needs 2 "carriage returns" and a paragraph will be created, which is simple. Have a look at the "Wikitext link from the other post" Parsing the wiki-syntax has 2 modes: - Inline-mode which is used for eg: ''bold'' or //italic// and - Block-mode which is used for eg: paragraphs, bullet lists, numbered lists and so on. A basic rule for UI developers is: Everything needs to be inline, ... because "whitespace matters" also for UI stuff :/. And ATM backwards compatibility forces us to keep it that way for some more time. ... With V5.1.15 a \whitespace trim option was implemented, which should improve the situation in the future. ... If someone rewrites the core UI in a readable way, with out breaking the whole thing. ... So time will tell. using \whitespace trim with macros needs to be activated per macro and looks like this: \define macro-name() \whitespcae trim ... your code here ... \end You can make your code more readable. ... BUT some widgets will need a "mode=block" parameter, since the default for widgets is "mode=inline" !!!!! The negated version is: \whitespcae notrim Also see: pragmas <https://tiddlywiki.com/#Pragma>. -mario -- 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 tiddlywikidev+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywikidev@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/0f688d32-e475-4321-9daa-900ed3234ec7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.