Edgewall Software

Changes between Version 8 and Version 9 of WikiRestructuredText


Ignore:
Timestamp:
Sep 19, 2004, 10:57:36 PM (20 years ago)
Author:
tonib
Comment:

Added example with code-block directive

Legend:

Unmodified
Added
Removed
Modified
  • WikiRestructuredText

    v8 v9  
    4848 }}}
    4949 }}}
     50
     51=== Syntax highlightning in reStructuredText ===
     52
     53There is a directive for doing TracSyntaxColoring in ReST as well. The directive is called
     54code-block
     55
     56Example
     57
     58{{{
     59{{{
     60#!rst
     61
     62.. code-block:: python
     63
     64 class Test:
     65
     66    def TestFunction(self):
     67        pass
     68
     69}}}
     70}}}
     71
     72Will result in the below.
     73
     74{{{
     75#!rst
     76
     77.. code-block:: python
     78
     79 class Test:
     80
     81    def TestFunction(self):
     82        pass
     83
     84}}}
    5085
    5186