summaryrefslogtreecommitdiff
path: root/sandbox/code-block-directive/docs/myfunction.py.pseudoxml
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2011-08-26 22:23:29 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2011-08-26 22:23:29 +0000
commitb991feb7b06e99b2186fc533733905da9312f5d3 (patch)
tree9da9826e25d07a95e86d0f0ed8c711ba13305e92 /sandbox/code-block-directive/docs/myfunction.py.pseudoxml
parent0ffd4b2d58dbf67c4f35be718de8e69de2210c92 (diff)
downloaddocutils-b991feb7b06e99b2186fc533733905da9312f5d3.tar.gz
Prepare code directive for inclusion in the core.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7105 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'sandbox/code-block-directive/docs/myfunction.py.pseudoxml')
-rw-r--r--sandbox/code-block-directive/docs/myfunction.py.pseudoxml54
1 files changed, 43 insertions, 11 deletions
diff --git a/sandbox/code-block-directive/docs/myfunction.py.pseudoxml b/sandbox/code-block-directive/docs/myfunction.py.pseudoxml
index 6a71c2ede..04bd2cb05 100644
--- a/sandbox/code-block-directive/docs/myfunction.py.pseudoxml
+++ b/sandbox/code-block-directive/docs/myfunction.py.pseudoxml
@@ -1,15 +1,25 @@
-<document source="/home/milde/.python/PyLit/trunk/rstdocs/features/myfunction.py.txt">
- <decoration>
- <footer>
- <paragraph>
- Generated on: 2007-06-05.
+<document source="/home/milde/Code/Python/docutils-svn/sandbox/code-block-directive/docs/myfunction.py.txt">
<paragraph>
- This is a test of the new code-block directive:
+ This is a test of the new "code" directive:
<comment xml:space="preserve">
Translate this document to HTML with a pygments enhanced frontend, e.g.
- rst2html-highlight --stylesheet=pygments-default.css --link-stylesheet
- <literal_block classes="code-block python" raw_content="[u'def my_function():', u' "just a test"', u' print 8/2']" xml:space="preserve">
+ ../rst2html-highlight.py --stylesheet=../data/pygments-default.css
+
+ ../rst2latex-highlight.py --stylesheet=../data/pygments-docutilsroles.sty
+
+ ../rst2pseudoxml-highlight.py
+ <paragraph>
+ The example from Docutils TODO list:
+ <literal_block classes="code pythonsi" xml:space="preserve">
+ print 'This is Python code.'
+ for i in range(10):
+ print i
+ <paragraph>
+ Another example:
+ <literal_block classes="code python silly" ids="my-function" names="my-function" xml:space="preserve">
+ <inline classes="ln">
+ 7
<inline classes="k">
def
@@ -18,10 +28,31 @@
<inline classes="p">
():
+ <inline classes="ln">
+ 8
+
+ <inline classes="sd">
+ """Test the lexer.
+ <inline classes="ln">
+ 9
+ <inline classes="sd">
+
+ <inline classes="ln">
+ 10
+ <inline classes="sd">
+ just a test"""
+
+ <inline classes="ln">
+ 11
+
+ <inline classes="ln">
+ 12
- <inline classes="s">
- "just a test"
+ <inline classes="c">
+ # and now for something completely different
+ <inline classes="ln">
+ 13
<inline classes="k">
print
@@ -32,4 +63,5 @@
/
<inline classes="mi">
2
-
+ <paragraph>
+ The end.