Hi Mat,
\define foo()
<!-- This is foo -->
\end
Everytime this macro is processed, the comment has to be "parsed" just to
be removed. ... comments outside macro code are ok, since global macros are
parsed at the TW startup and "outside comments" are thrown away.
For simple macros, that's not a problem. ... but for "well documented
macros" the documentation, can easily become bigger than the "executed"
code. ... I'm talking about TOC like macros. ... There really should be
docs, but it's a performance problem, with "recursive" macros.
So heavily commenting inside macros imo isn't the best idea. ...
performance wise.
------------- techy stuff ...
The internal parse tree looks like this.
[
{
"type": "set",
"attributes": {
"name": {
"type": "string",
"value": "foo"
},
"value": {
"type": "string",
"value": "<!-- This is foo -->"
}
},
"children": [],
"params": []
}
]
The rendered output is:
That's not efficient for heavy docs inside the macros. ..
@Jeremy, ... What if we do create a new "comment" syntax for macros and do
a sanitation run before we store the global macros in variables?? ... @Mat
this proposal would be for $:/tags/Macro tiddlers only.
just some thoughts.
-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 [email protected].
To post to this group, send email to [email protected].
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/58d70c4f-a0a0-4a61-b57b-3075a690c1fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.