As you start trying to build more complicated functionality in wikitext, you may sometimes want to keep some information in your wikitext that doesn't appear in the rendered output. For instance, you might want to remind yourself why you chose to use a certain filter or HTML tag, or keep a copy of an old filter around while tinkering on a new filter so that you can return to the old one if you mess something up.
This can be accomplished via comments. TiddlyWiki piggybacks on HTML's comment syntax, which begins a comment section with <!--
and ends it with -->
. Comments can be used almost anywhere:
<!-- This is a comment. -->
Here's some ordinary text that appears in the output. On the other hand, the <!-- secret --> word doesn't show up.
<!--
A comment can go on
for multiple lines
if you like.
-->
<!--
HTML and wikitext can be included in comments. It's ''easy as''
<ul style="color: red;">
<li>one</li>
<li>two</li>
<li>three.</li>
</ul>
-->
Here's an uncommented list:
<!-- The * creates a wikitext list. -->
* four
* five
* six
Here's some ordinary text that appears in the output. On the other hand, the word doesn't show up.
Here's an uncommented list:
- four
- five
- six
Note, however, that comments cannot be placed inside other comments:
<!-- start of first comment
<!-- an attempt at creating a comment within the comment -->
but the comment ends after the comment within the comment
-->
but the comment ends after the comment within the comment –>
Turning what would otherwise be functional wikitext into a comment temporarily, preventing it from appearing in the output, is often called commenting out that wikitext.