diff options
author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2010-11-30 11:59:33 +0000 |
---|---|---|
committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2010-11-30 11:59:33 +0000 |
commit | c5880303ec69f984827af77f08cf3d9a54f83cd2 (patch) | |
tree | 8730121b4af5e5ae5a3d01f5f8b3027b394aeef6 /sandbox/code-block-directive/rst2html-highlight | |
parent | 976cec43efc64e68a9e2a1fc27135a11b27938aa (diff) | |
download | docutils-c5880303ec69f984827af77f08cf3d9a54f83cd2.tar.gz |
Prepare CodeBlock directive for inclusion in the Docutils core.
Rename directive and class from "code-block" to "code".
Fix fallback if pygments not found.
Use class-based interface.
Add "number-lines" option.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6488 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'sandbox/code-block-directive/rst2html-highlight')
-rwxr-xr-x | sandbox/code-block-directive/rst2html-highlight | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sandbox/code-block-directive/rst2html-highlight b/sandbox/code-block-directive/rst2html-highlight index d80b87ec8..ecfa61574 100755 --- a/sandbox/code-block-directive/rst2html-highlight +++ b/sandbox/code-block-directive/rst2html-highlight @@ -1,17 +1,18 @@ #!/usr/bin/python +# coding: utf-8 # rst2html-highlight # ================== -# +# # Docutils front-end with syntax highlight. -# -# :Author: David Goodger, the Pygments team, Günter Milde +# +# :Author: David Goodger, Georg Brandl, Günter Milde # :Date: $Date: 2008-05-22 08:42:52 +0200 (Do, 22. Mai 2008) $ # :Copyright: This module has been placed in the public domain. -# +# # This is a merge of the docutils_ `rst2html` front end with an extension # suggestion taken from the pygments_ documentation. -# +# # :: """ @@ -19,13 +20,13 @@ A front end to docutils, producing HTML with syntax colouring using pygments Generates (X)HTML documents from standalone reStructuredText sources. Uses `pygments` to parse and mark up the content of ``.. code-block::` directives. -Needs an adapted stylesheet +Needs an adapted stylesheet """ # Requirements # ------------ -# -# :: +# +# :: try: import locale |