| 1 | = CodeExample = |
| 2 | |
| 3 | == Description == |
| 4 | |
| 5 | The Trac plugin for code examples colouring. It support three types of examples - a simple, a correct and an incorrect. |
| 6 | |
| 7 | == Bugs/Feature Requests == |
| 8 | |
| 9 | Existing bugs and feature requests for CodeExampleMacro are |
| 10 | [report:9?COMPONENT=CodeExampleMacro here]. |
| 11 | |
| 12 | If you have any issues, create a |
| 13 | [http://trac-hacks.org/newticket?component=CodeExampleMacro&owner=nuald new ticket]. |
| 14 | |
| 15 | == Download == |
| 16 | |
| 17 | Download the zipped source from [download:codeexamplemacro here]. |
| 18 | |
| 19 | == Source == |
| 20 | |
| 21 | You can check out CodeExampleMacro from [http://trac-hacks.org/svn/codeexamplemacro here] using Subversion, or [source:codeexamplemacro browse the source] with Trac. |
| 22 | |
| 23 | == Example == |
| 24 | |
| 25 | The simple example: |
| 26 | {{{ |
| 27 | {{{ |
| 28 | #!CodeExample |
| 29 | #!python |
| 30 | def main(): |
| 31 | pass |
| 32 | }}} |
| 33 | }}} |
| 34 | |
| 35 | The incorrect example: |
| 36 | {{{ |
| 37 | {{{ |
| 38 | #!BadCodeExample |
| 39 | #!cpp |
| 40 | void main() { |
| 41 | return -1; |
| 42 | } |
| 43 | }}} |
| 44 | }}} |
| 45 | |
| 46 | The correct example: |
| 47 | {{{ |
| 48 | {{{ |
| 49 | #!GoodCodeExample |
| 50 | #!java |
| 51 | public void isCorrect() { throw new NotImplementedException(); } |
| 52 | }}} |
| 53 | }}} |
| 54 | |
| 55 | == Recent Changes == |
| 56 | |
| 57 | [[ChangeLog(codeexamplemacro, 3)]] |
| 58 | |
| 59 | == Author/Contributors == |
| 60 | |
| 61 | '''Author:''' [wiki:nuald] [[BR]] |
| 62 | '''Contributors:''' |