Wiki Syntax Highlighter
- Details
- Category: Wiki Help
- Published: Saturday, 09 November 2013 17:04
- Hits: 20783
1. Wiki Syntax Highlighter
allows syntax highlighting of source code for several markup and programming languages.
To adding content simply use the HTML pre tag with the xml:lang attribute.
The value of the attribute needs to be the language that is to be syntax highlighted.
For example:
<pre xml:lang="delphi">
type
record-ptr =^ record-name;
record-name = record
field-1: field-type1;
field-2: field-type2;
...
field-n: field-typen;
end;
</pre>
will give you text with "Delphi" syntax highlighted.
2. Language Support
more than 200 programming languages and configuration syntaxes, including:
ActionScript, Ada, Apache Log, AppleScript, ASM, ASP, Bash, C, ColdFusion, C++, QT, C#, CSS, D, Delphi, Diff, DOS, dot, Eiffel, Fortran, Groovy, Haskell, HTML, INI, Inno, Java, Javascript, LaTeX, Lisp, Lua, Motorola 68000 Assembler, Matlab, mIRC Scripting, MySQL, Objective C, OCaml, OpenOffice.org Basic, Oracle 8 SQL, Pascal, Perl, PHP, PL/SQL, Python, QBasic/QuickBASIC, Rails, Microsoft Registry, robots.txt, Ruby, SAS, Scheme, Smalltalk, Smarty, SQL, TCL, Text, Visual Basic, vb.net, VHDL, XML, X++.
They are all triggered respectively as follows:
<pre xml:lang="delphi"> <pre xml:lang="pascal"> <pre xml:lang="HTML"> <pre xml:lang="INI"> <pre xml:lang="Javascript"> <pre xml:lang="MySQL"> <pre xml:lang="PHP"> <pre xml:lang="SQL"> <pre xml:lang="XML">