summaryrefslogtreecommitdiff
path: root/sphinx/addnodes.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-12-28 21:30:25 +0100
committerGeorg Brandl <georg@python.org>2008-12-28 21:30:25 +0100
commitb3d55c31390a6a09e15641886496e7bad140e7c2 (patch)
treedd720b4a1b898608ee6e850c830c37c6d91c082e /sphinx/addnodes.py
parente2c52d6e906d84a931df32b2e5e34976775ab69b (diff)
downloadsphinx-git-b3d55c31390a6a09e15641886496e7bad140e7c2.tar.gz
Close #4: Added a ``:download:`` role that marks a non-document file
for inclusion into the HTML output and links to it.
Diffstat (limited to 'sphinx/addnodes.py')
-rw-r--r--sphinx/addnodes.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/sphinx/addnodes.py b/sphinx/addnodes.py
index a9135b0ab..1d719d88f 100644
--- a/sphinx/addnodes.py
+++ b/sphinx/addnodes.py
@@ -68,6 +68,9 @@ 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
@@ -95,8 +98,8 @@ 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_returns
- desc_addname desc_name desc_parameterlist desc_parameter desc_optional
+ desc_type desc_returns desc_addname desc_name desc_parameterlist
+ desc_parameter desc_optional download_reference
centered versionmodified seealso productionlist production toctree
pending_xref compact_paragraph highlightlang literal_emphasis
glossary acks module start_of_file tabular_col_spec meta""".split())