Skip to content

Commit

Permalink
Add Pygments support to the default sourcecode directive.
Browse files Browse the repository at this point in the history
It is now possible to have highlited sourcecode using the ``::`` syntax.
  • Loading branch information
almet committed Jun 18, 2011
1 parent 96c42c0 commit 95b44ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pelican/rstdirectives.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ def run(self):
return [nodes.raw('', parsed, format='html')]

directives.register_directive('code-block', Pygments)
directives.register_directive('sourcecode', Pygments)
2 changes: 1 addition & 1 deletion samples/content/super_article.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ And here comes the cool stuff_.
:width: 600 px
:alt: alternate text

.. code-block:: python
::

>>> from ipdb import set_trace
>>> set_trace()
Expand Down

0 comments on commit 95b44ef

Please sign in to comment.