cogPretty prints code snippets
Typeradeoxmacro
Developed by

XWiki Development Team

Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1

Description

Replaced by the Code Macro.

XWiki's code macro inherits from Radeox's code macro and has the same features.

Usage

{code[:none|:java|:xml|:sql]}

Parameters definition

  • none: no formatting
  • java: forces the pretty printer to use the Java coloring scheme. This is the default.
  • xml: forces the pretty printer to use the XML coloring scheme.
  • sql: force the pretty printer to use the SQL coloring scheme.

If no format is specified then the macro defaults to java.

Example

{code}
public class MyClass {
  public void helloWorld() {}
}
{code}

{code:xml}
<hello>
  <world>Cool!</world>
</hello>
{code}

{code:sql}
SELECT * FROM TABLE;
{code}

Result

public class MyClass {
  public void helloWorld() {}
}
<hello>
 <world>Cool!</world>
</hello>
SELECT * FROM TABLE;
Tags:
Created by VincentMassol on 2006/12/10 21:18
    

Get Connected