The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Help:Funtoo Editing Guidelines/Basics"
Line 34: | Line 34: | ||
</nowiki>}} | </nowiki>}} | ||
It is a common error for new wiki contributors to leave extra whitespace after the {{c|{{!}}}} character when specifying a parameter to a template, particularly when they are using {{c|<nowiki>{{note}}</nowiki>}} or similar templates. This will cause the first parameter to render as ''monospace'', which is not generally what you want! So, instead of getting a proper tip like this: | It is a common error for new wiki contributors to leave extra whitespace after the {{c|{{!}}}} character when specifying a parameter to a template, particularly when they are using {{c|<nowiki>{{note}}</nowiki>}} or similar templates. This will cause the first parameter to render as ''monospace'', which is not generally what you want! So, instead of getting a proper tip like this, specified in wikitext as: | ||
{{file|name=example wikitext of correctly-written tip|body=<nowiki> | {{file|name=example wikitext of correctly-written tip|body=<nowiki> | ||
{{tip|This is an example tip!}} | {{tip|This is an example tip!}} | ||
</nowiki>}} | </nowiki>}} | ||
...which renders correctly as: | |||
{{tip|This is an example tip!}} | {{tip|This is an example tip!}} | ||
...you will instead get the following: | |||
{{tip| This is a broken tip in monospace because I have a leading space after {{!}}!}} | {{tip| This is a broken tip in monospace because I have a leading space after {{!}}!}} |
Revision as of 02:59, February 24, 2019
Paragraphs
To create a new paragraph, insert a blank line between two lines of text. If a blank line doesn't exist between two lines of wikitext, they will be combined into a single flowing paragraph.
If you leave leading whitespace at the beginning of a line, MediaWiki will render it as pre-formatted text. Beware of this. See below for more info.
Here's an example of how whitespace at the beginning of text (in this case, just a single space) will force mediawiki to render text as pre-formatted. This can be handy when you want it, and a pain when you don't want it -- so be aware of this feature!
example wikitext
This is supposed to be standard wikitext but is rendering as monospace instead!
^
\
there is an extra space here!
This will render in monospaced text as follows:
This is supposed to be standard wikitext but is rendering as monospace instead!
Template Parameters
Templates are MediaWiki's versions of "macros" or functions, and typically look like this in wikitext:
example wikitext for template call
{{c|foobar}}
Above, we are calling the Template:C template and specifying its first parameter to be the string foobar
. Another way to specify the first
parameter is using the 1|
convention, as follows, which does the same thing as the previous template call:
example wikitext for template call, now with 1|
{{c|1=foobar}}
It is a common error for new wiki contributors to leave extra whitespace after the |
character when specifying a parameter to a template, particularly when they are using {{note}}
or similar templates. This will cause the first parameter to render as monospace, which is not generally what you want! So, instead of getting a proper tip like this, specified in wikitext as:
example wikitext of correctly-written tip
{{tip|This is an example tip!}}
...which renders correctly as:
This is an example tip!
...you will instead get the following:
This is a broken tip in monospace because I have a leading space after |!
Here is the wikitext that produced the rendering error. Can you see the problem?
example wikitext of 'broken' tip
{{tip| This is a broken tip because I have a leading space after {{!}}!}}