Help:Comment tags

From The Final Challenge Wiki
Jump to navigation Jump to search

Template:H:h Comment tags and what is between them are removed on expansion of the wikitext. In the case of one or more comments separated by single newlines, the newlines before, between, and after these count as not more than one. If such sequences are separated by e.g. two newlines, this rule applies separately for each sequence.

wikitext result of expanding
a<!--foo-->b

a
<!--foo-->b

a<!--foo-->
b

a
<!--foo-->
b

a<!--foo-->
<!--foo-->b

a
<!--foo-->
<!--foo-->b

a<!--foo-->
<!--foo-->
b

a
<!--foo-->
<!--foo-->
b

a<!--foo--> <!--foo-->b

a
<!--foo--> <!--foo-->b

a<!--foo--> <!--foo-->
b

a
<!--foo--> <!--foo-->
b


a<!--foo-->

<!--foo-->b

a
<!--foo-->

<!--foo-->b

a<!--foo-->

<!--foo-->
b

a
<!--foo-->

<!--foo-->
b
ab

a
b

a
b

a
b

a
b

a
b

a
b

a
b

a b

a
 b

a 
b

a
 
b


a

b

a

b

a

b

a

b

Substitution

Preservation of comment tags on substitution can be useful to have a record in the wikitext on how it was produced, but it may also give undesirable clutter, with comments that do not make sense in the context of the resulting wikitext.

For preservation on substitution there are the following options:

  • always preserve: just put the comment tags
  • never preserve: put the comment tags in <noinclude> tags
  • control preservation: instead of comment tags, use Template:Void as follows:
{{{{{|safesubst:}}}void|..}} with the comment at the dots.

Parameter tags inside comment tags do not work, but they do in the void-method.

All this can be tried out with {{subst:Help:Comment tags/1|7}} and {{subst:Help:Comment tags/1|=|7}}, which substitute Help:Comment tags/1. The first removes the controllable comments, the second does not.

See also

Template:H:f