Table of Contents

How to use syntax highlighting


srchub has 2 systems for syntaxhighlighting.

  • Syntaxhighlighter -
  • Prettyprint -


This is used when viewing source. You can use it in documentation/wiki as well.

If you would like to have links to lines in your sample code you can wrap your code in a <div id="highlight"> tag

For example:

/* some css */

Note: for C/C++ examples if you are including a header file then you need to use the script tag rather than a pre tag.


Pros: Looks nicer, ability to select different themes from your project management page

Cons: Have to specify the language

List of brushes

Brush Name Brush Alias
ActionScript as3, actionscript3
Bash/shell bash, shell
ColdFusion cf, coldfusion
C# c-sharp,csharp
C++ cpp, c
CSS css
Delphi delphi, pas, pascal
Diff diff, patch
Erlang erl, erlang
Groovy groovy
Javascript js, jscript, javascript
Java java
JavaFX jfx, javafx
Perl perl, pl
PHP php
Plain Text plain, text
PowerShell ps, powershell
Python py, python
Ruby rails, ror, ruby
Scala scala
SQL sql
Visual Basic vb, vbnet
XML xml, xhtml, xslt, html

Pretty print

Pretty print is a generic highlighter.

<pre class="prettyprint">
// some code
// some code

Pros: It's simple

Cons: The highlighting isn't as good as syntaxhighlighter

Created: 8 years 10 months ago
by Natalie Adams

Updated: 8 years 1 month ago
by Natalie Adams


Old Revisions

Page rendered in 0.02912s using 25 queries.