wiki:CodeExampleMacro

Version 1 (modified by nuald, 6 years ago) (diff)

New hack CodeExampleMacro, created by nuald

CodeExample

Description

The Trac plugin for code examples colouring. It support three types of examples - a simple, a correct and an incorrect.

Bugs/Feature Requests

Existing bugs and feature requests for CodeExampleMacro are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out CodeExampleMacro from here using Subversion, or browse the source with Trac.

Example

The simple example:

{{{
#!CodeExample
#!python
def main():
    pass
}}}

The incorrect example:

{{{
#!BadCodeExample
#!cpp
void main() {
    return -1;
}
}}}

The correct example:

{{{
#!GoodCodeExample
#!java
public void isCorrect() { throw new NotImplementedException(); }
}}}

Recent Changes

[14039] by rjollos on 2014-07-26 02:37:54
1.2: Include images in egg and fixed links to sample screenshots. Fixes #8331.

Thanks to AllenB and ilewismsl for the patches.

[14038] by rjollos on 2014-07-26 02:37:35
Added URL to setup.py and bumped version to 1.1. Refs #9716.
[14037] by rjollos on 2014-07-26 02:37:25
Fixed title bar link when repository is specified. Fixes #9716.

Author/Contributors

Author: nuald
Contributors:

Attachments (7)

Download all attachments as: .zip