diff options
author | shirou <shirou.faw@gmail.com> | 2014-08-12 14:11:54 +0900 |
---|---|---|
committer | shirou <shirou.faw@gmail.com> | 2014-08-12 14:11:54 +0900 |
commit | 4e70d364bad5d1c79e68aa5541db4a89e250f164 (patch) | |
tree | 973c218862081e38a2ee807845ca2d304a9bcae1 /doc/markup | |
parent | ea37c015520d0546c207c2307ac0653dd882057e (diff) | |
download | sphinx-git-4e70d364bad5d1c79e68aa5541db4a89e250f164.tar.gz |
add test and document about diff params in literalinclude.
Diffstat (limited to 'doc/markup')
-rw-r--r-- | doc/markup/code.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/markup/code.rst b/doc/markup/code.rst index 936080d6e..c1d9c25f4 100644 --- a/doc/markup/code.rst +++ b/doc/markup/code.rst @@ -180,6 +180,16 @@ Includes ``prepend`` and ``append`` option, respectively. This is useful e.g. for highlighting PHP code that doesn't include the ``<?php``/``?>`` markers. + + If you want to show the diff of the code, you can specify the old + file by giving a ``diff`` option:: + + .. literalinclude:: example.py + :diff: example.py.orig + + This shows the diff between example.py and example.py.orig with unified diff format. + + .. versionadded:: 0.4.3 The ``encoding`` option. .. versionadded:: 0.6 @@ -187,6 +197,8 @@ Includes as well as support for absolute filenames. .. versionadded:: 1.0 The ``prepend`` and ``append`` options, as well as ``tab-width``. + .. versionadded:: 1.3 + The ``diff`` option. Showing a file name |