Template talk:SyntaxHighlight
From Amahi Wiki
Syntax Highlight for Code
Language | ||
---|---|---|
lang="php" | you type |
<syntaxhighlight lang="php"> <?php $v = "string"; // sample initialization ?> </syntaxhighlight> |
you get |
<?php
$v = "string"; // sample initialization
?>
| |
lang="ruby" | you type |
<syntaxhighlight lang="ruby"> > ["Amahi", "Linux"].map{|i| "#{i} is cool!"} => ["Amahi is cool!", "Linux is cool!"] </syntaxhighlight> |
you get | > ["Amahi", "Linux"].map{|i| "#{i} is cool!"}
=> ["Amahi is cool!", "Linux is cool!"]
|
We have set the syntax highliting extension with bash as the default language, since it's probably the most common in this wiki. You can override it as above.