summaryrefslogtreecommitdiff
path: root/sphinx/addnodes.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-01-13 23:59:01 +0100
committerGeorg Brandl <georg@python.org>2009-01-13 23:59:01 +0100
commit2d740f6f61c6a783fc0c270188393e30997ddb25 (patch)
tree959f93834256617ea84f2144baa4bf5cb8d18dee /sphinx/addnodes.py
parentc8095115faac2bf326c856f531691bfe0661b613 (diff)
parent778631271c3ee71d0e54e6405db1a951f4de4e09 (diff)
downloadsphinx-2d740f6f61c6a783fc0c270188393e30997ddb25.tar.gz
merge with 0.5
Diffstat (limited to 'sphinx/addnodes.py')
-rw-r--r--sphinx/addnodes.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/sphinx/addnodes.py b/sphinx/addnodes.py
index 6ea47d31..a4af584c 100644
--- a/sphinx/addnodes.py
+++ b/sphinx/addnodes.py
@@ -23,8 +23,12 @@ class desc(nodes.Admonition, nodes.Element): pass
class desc_addname(nodes.Part, nodes.Inline, nodes.TextElement): pass
# compatibility alias
desc_classname = desc_addname
-# return type (C); object type, e.g. -> annotation (Python)
+# return type (C); object type
class desc_type(nodes.Part, nodes.Inline, nodes.TextElement): pass
+# -> annotation (Python)
+class desc_returns(desc_type):
+ def astext(self):
+ return ' -> ' + nodes.TextElement.astext(self)
# main name of object
class desc_name(nodes.Part, nodes.Inline, nodes.TextElement): pass
# argument list
@@ -64,9 +68,16 @@ class pending_xref(nodes.Element): pass
# compact paragraph -- never makes a <p>
class compact_paragraph(nodes.paragraph): pass
+# reference to a file to download
+class download_reference(nodes.reference): pass
+
# for the ACKS list
class acks(nodes.Element): pass
+# for horizontal lists
+class hlist(nodes.Element): pass
+class hlistcol(nodes.Element): pass
+
# sets the highlighting language for literal blocks
class highlightlang(nodes.Element): pass
@@ -90,8 +101,9 @@ class meta(nodes.Special, nodes.PreBibliographic, nodes.Element): pass
# make them known to docutils. this is needed, because the HTML writer
# will choke at some point if these are not added
-nodes._add_node_class_names("""index desc desc_content desc_signature desc_type
- desc_addname desc_name desc_parameterlist desc_parameter desc_optional
+nodes._add_node_class_names("""index desc desc_content desc_signature
+ desc_type desc_returns desc_addname desc_name desc_parameterlist
+ desc_parameter desc_optional download_reference hlist hlistcol
centered versionmodified seealso productionlist production toctree
pending_xref compact_paragraph highlightlang literal_emphasis
glossary acks module start_of_file tabular_col_spec meta""".split())