Help:Comment tags

From SacredWiki
Revision as of 20:11, 29 November 2012 by 149.173.6.50 (talk) (Added a break within the comment itself.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins +/-

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-->
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


Links to other help pages

Help contents
Meta · Wikinews · Wikipedia · Wikiquote · Wiktionary · Commons: · mw: · b: · s: · mw:Manual · Google
Versions of this help page (for other languages see further)
Meta · Wikinews · Wikipediahttp://en.wikipedia.org/index.php/Help:Comment_tags · Wikiquote · Wiktionary
What links here on Meta or from Meta · Wikipedia · MediaWiki
Reading
Go · Search · Stop words · Namespace · Page name · Section · Backlinks · Redirect · Category · Image page · Special pages · Printable version
Tracking changes
Recent changes (enhanced) | Related changes · Watching pages · Diff · Page history · Edit summary · User contributions · Minor edit · Patrolled edit
Logging in and preferences
Logging in · Preferences · User style
Editing
Starting a new page · Advanced editing · Editing FAQ · Edit toolbar · Export · Import · Shortcuts · Edit conflict · Page size
Referencing
Links · URLs · Piped links · Interwiki linking · Footnotes
Style and formatting
Wikitext examples · CSS · Reference card · HTML in wikitext · Formula · List · Table · Sorting · Colors · Images and file uploads
Fixing mistakes
Show preview · Testing · Reverting edits
Advanced functioning
Expansion · Template · Advanced templates · Parser function · Parameter default · Variable · System message · Substitution · Array · Calculation · Embed page
Others
Special characters · Renaming (moving) a page · Talk page · Signatures · Sandbox · Legal issues for editors