Skip to content

Macro Comment Gotcha

papa0 edited this page Jan 29, 2015 · 2 revisions

Do not insert tiddlywiki comments (/% This is a comment ... %/) at the top of a Twee file before the first passage.

Because of the way build.py works, such comments may be concatentated to the end of macro definitions in earlier Twee files and will cause an error when the Team Tale page is opened and the browser attempts to execute the comment along with the macro.

You can avoid this problem by putting a passage title line at the top of each Twee file (like ":: user-filename"). Then comments can be inserted without a problem. Or you can add the [annotation] tag to the passage title line and Twee will treat all of the passage text as comments without having to enclose it in /%...%/.

If you define a macro in any of your Twee files, you can also prevent the above problem by inserting a passage title line after the end of your macro definition (for example, ":: user-end macro.twee").

Clone this wiki locally