summaryrefslogtreecommitdiff
path: root/doc/markup/code.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-02-24 13:38:15 +0100
committerGeorg Brandl <georg@python.org>2009-02-24 13:38:15 +0100
commitfb511a015aa47c943c5dc1286f58743fca307b1c (patch)
tree737f4a288eaaf69898c3139fdb0c79499c4bf910 /doc/markup/code.rst
parent29247f0896fc66a54d2fe77d05d32b0786c84a18 (diff)
downloadsphinx-git-fb511a015aa47c943c5dc1286f58743fca307b1c.tar.gz
Paths to literal include files and download files can now be absolute too.
Diffstat (limited to 'doc/markup/code.rst')
-rw-r--r--doc/markup/code.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/markup/code.rst b/doc/markup/code.rst
index 28f752365..93cd127ba 100644
--- a/doc/markup/code.rst
+++ b/doc/markup/code.rst
@@ -99,7 +99,9 @@ Includes
.. literalinclude:: example.py
- The file name is relative to the current file's path.
+ The file name is usually relative to the current file's path. However, if it
+ is absolute (starting with ``/``), it is relative to the top source
+ directory.
The directive also supports the ``linenos`` flag option to switch on line
numbers, and a ``language`` option to select a language different from the
@@ -144,7 +146,8 @@ Includes
.. versionadded:: 0.4.3
The ``encoding`` option.
.. versionadded:: 0.6
- The ``pyobject``, ``lines``, ``start-after`` and ``end-before`` options.
+ The ``pyobject``, ``lines``, ``start-after`` and ``end-before`` options,
+ as well as support for absolute filenames.
.. rubric:: Footnotes