Changes

From Amahi Wiki
Jump to: navigation, search
711 bytes added ,  00:12, 2 January 2011
no edit summary
* [http://www.mediawiki.org/wiki/Help:Images Images]
* [http://www.mediawiki.org/wiki/Help:Tables Tables]
 
= Code Formatting =
To add formatting to code, we have a little [[Template:Code code template]] that can be used like this:
<pre>
::{{Code|bash$ this is a bash command
-bash: this: command not found
bash$
}}
</pre>
Which should look like this:
::{{Code|bash$ this is a bash command
-bash: this: command not found
bash$
}}
 
If you like syntax highlighting, we have the syntax highlight extension and you can do this:
 
<pre>
<syntaxhighlight lang="php">
<?php $v = "string"; // sample initialization ?>
This is some html text
</syntaxhighlight>
</pre>
 
To look like:
 
<syntaxhighlight lang="php">
<?php $v = "string"; // sample initialization ?>
This is some html text
</syntaxhighlight>
 
or
 
<pre>
<syntaxhighlight lang="ruby">
> ["Amahi", "Linux"].map{|i| "#{i} is cool!"}
=> ["Amahi is cool!", "Linux is cool!"]
</syntaxhighlight>
</pre>
 
To look like:
 
<syntaxhighlight lang="ruby">
> ["Amahi", "Linux"].map{|i| "#{i} is cool!"}
=> ["Amahi is cool!", "Linux is cool!"]
</syntaxhighlight>
[http://meta.wikimedia.org/wiki/Help:Editing Complete editing help]
Trusted, Bots, Bureaucrats, emailconfirmed, Administrators
4,144

edits