Ticket #635 (closed defect: fixed)
[merge]:code_block directive to rst
| Reported by: | tonib | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | wiki system | Version: | 0.7.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Hi,
I am mainly writing in rst wiki syntax. But one of the things missing in this is to syntax highlight code block.
In the trac wiki syntax this is possible with the {{{ #!cpp }}} syntax.
I looked around on the net and found a solution in the leo project. They have introduced a code_block directive. So one writes
.. code_block:: Python
To get a code_block with python syntax.
I have attached how they implement it in leo. It isn't very complex. I dont know how to integrate it in trac.
Leo is distributed under a python license which is a BSD style license. So it should be no problems to use it in trac.


