code-highlight task
The code-highlight task adds syntex highlighting to <code> tags.
Note
The highlighting is done using the Pygments syntax highlighter.
Task attributes
None.
Task elements
| Element name | Multiplicity | Description |
|---|---|---|
| input | [1..n] | The name of the input file. |
| output | [0..1] | The name of the output file. Optional. |
Each input element can have the following attributes:
| Attribute name | Default value | Description |
|---|---|---|
| encoding | utf-8 | The encoding of the input file. |
Each output element can have the following attributes:
| Attribute name | Default value | Description |
|---|---|---|
| encoding | utf-8 | The encoding of the output file. |
Task behaviour
The tasks looks for <code> tags in the input, which needs to be xhtml, and applies the pygments syntax highlighting on the code, if available.
If an output element is given, the result will be saved to a file with the given name.
Example
will be converted to