Hi Mark
> Some of my macros have become quite complex and difficult to read
You can use line breaks to make things a bit easier to read:
\define cite(citekeys:"")
(<$list filter="$citekeys$ +[sort[]] +[each[authors]] +[first[]]">
<<citeauths>>
<$list filter="$citekeys$ +[authors{!!authors}] +[sort[]]">,
<$link tiddler="currentTiddler">{{!!year}}</$link>
</$list>
</$list>
<$list filter="$citekeys$ +[sort[]] +[each[authors]] +[rest[]]">;
<<citeauths>>
<$list filter="$citekeys$ +[authors{!!authors}] +[sort[]] ">,
<$link tiddler="currentTiddler">
{{!!year}}
</$link>
</$list>
</$list>)
\end
You can also include comments of the form <!-- this is a comment -->
The only thing to watch out for is that in a very few situations those line
breaks will affect formatting. The line breaks are preserved into the HTML.
HTML semantics generally mean that adjacent whitespace is collapsed
together, so typically the whitespace generated by the linebreaks is
collapsed into adjacent white space.
Best wishes
Jeremy.
On Sat, Nov 22, 2014 at 7:18 AM, Stephan Hradek <[email protected]>
wrote:
> As whitespace helps in commenting but whitespace is meaningfull in
> wikitext, I would create a seperate tiddler where I reformat and describe
> the text. So no inline comments in the macro.
>
> OTOH - as this is at least double effort - you could try what happens if
> you insert comments containing linebreaks. like <!--
>
> this is a comment
>
> -->so
>
> --
> 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 http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>
--
Jeremy Ruston
mailto:[email protected]
--
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.