0

I was using this directive but the html generated simply omitted my code. For example, if I use:

.. code:: python

 def my_function():
     "just a test"
     print 8/2

The html generated just doesn't contain this block of code whatsoever.

I have Pygments installed on my machine. Also, I'm using Pandoc to generate the html file.

Any idea what I'm doing wrong?

mzjn
  • 48,958
  • 13
  • 128
  • 248
Derek Chiang
  • 3,330
  • 6
  • 27
  • 34
  • Can you please tell me how you generate the file (the command, the output and so on)? At least Sphinx itself can handle highlighted code blocks, but they are part of standard restructured text. – Mikko Ohtamaa Dec 05 '12 at 20:20

1 Answers1

1

The development version of pandoc understands the language specification on .. code:: and will generate highlighted code from your input. This feature will be in the next release.

John MacFarlane
  • 8,511
  • 39
  • 33