Ticket #4583 enhancement closed fixed
lore2sphinx should use `code-block` blocks for code samples.
| Reported by: | Screwtape | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Keywords: | documentation |
| Cc: | khorn | Branch: | |
| Author: | Launchpad Bug: |
Description
The current Twisted Documentation Standard describes the three different kinds of code-snippets that Lore can prettify: python, python-interpreter and shell:
<pre class="python"> print "hello, world" </pre> <pre class="python-interpreter"> >>> 1 + 1 2 </pre> <pre class="shell"> $ twistd --version </pre>
Currently, lore2sphinx throws away the class information and renders all three as plain block-text constructs:
:: print "hello, world" :: >>> 1+1 2 :: $ twistd --version
Due to the Magic of Sphinx, the first two examples are properly detected and syntax-highlighted anyway, but the third is not. It would be good if lore2sphinx could include the type information in the ReST markup:
.. code-block:: python print "hello, world" .. code-block:: pycon >>> 1+1 2 .. code-block:: console $ twistd --version
Change History
Note: See
TracTickets for help on using
tickets.
