Difference between revisions of "Instructions to Wiki Editors"

Jump to navigation Jump to search
→‎SyntaxHighlight: Update information about extension
(→‎SyntaxHighlight: Update information about extension)
Line 33: Line 33:
There are several wiki extensions installed to help you in the editing task.
There are several wiki extensions installed to help you in the editing task.


== SyntaxHighlight GeSHi ==
== SyntaxHighlight ==
This extension can be used to present source code with syntax highlighting. As you can guess for us it is mainly useful for C++ code, but it can also be used with other languages.
This extension can be used to present source code with syntax highlighting. As you can guess for us it is mainly useful for C++ code, but it can also be used with other languages.


'''Link:''' http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi
'''Link:''' https://www.mediawiki.org/wiki/Extension:SyntaxHighlight


'''Syntax:'''
'''Syntax:'''
Line 64: Line 64:
</source>
</source>


Historically, we used a slightly different extension (also based on GeSHi) with a different syntax. For backward compatibility the extension now installed has been customized to also support this other syntax.
The extension also now supports using the ''syntaxhighlight'' tag instead of ''source'', which can help if the code itself contains the source tag:


<pre>
<pre>
<syntax type="C++">
<syntaxhighlight lang="xml">
#include <foo.h>
    <header path="include/foo.h" />
 
     <source path="src/foo.cpp" />
class MyClass {
</syntaxhighlight>
public:
     MyClass();
    ~MyClass();
};
</syntax>
</pre>
</pre>


TrustedUser
2,147

edits

Navigation menu