SyntaxHighlight demo
From Notaclue Wiki
| SyntaxHighlight | |
|---|---|
| Documentation | |
| Maintained by WikiTeq? |
No |
| Bundled | Since version 1.21 |
| Version | |
This wiki has the SyntaxHighlight extension installed, which adds the ability to add syntax highlighting for various languages.
For example, JavaScript highlighting
function isEven( number ) {
return ( number % 2 === 0 );
}
console.log( '4 is: ' + ( isEven( 4 ) ? 'even' : 'odd' ) );
console.log( '5 is: ' + ( isEven( 5 ) ? 'even' : 'odd' ) );
is the result of
<syntaxhighlight lang="javascript" line>
function isEven( number ) {
return ( number % 2 === 0 );
}
console.log( '4 is: ' + ( isEven( 4 ) ? 'even' : 'odd' ) );
console.log( '5 is: ' + ( isEven( 5 ) ? 'even' : 'odd' ) );
</syntaxhighlight>