summaryrefslogtreecommitdiff
path: root/doc/markup/code.rst
diff options
context:
space:
mode:
authorTakayuki Shimizukawa <shimizukawa@gmail.com>2014-08-10 23:03:02 +0900
committerTakayuki Shimizukawa <shimizukawa@gmail.com>2014-08-10 23:03:02 +0900
commitd39327d5398a4fe55bb72c9b4dc13dad544cf9d0 (patch)
tree661708835e2d98ee78cd12b22c70858728e26732 /doc/markup/code.rst
parent4f357d9edd759eca96cee7e7cccbace1479ff834 (diff)
downloadsphinx-git-d39327d5398a4fe55bb72c9b4dc13dad544cf9d0.tar.gz
* for pull request #258: update CHANGES, add tests, add a document and refactoring.
Diffstat (limited to 'doc/markup/code.rst')
-rw-r--r--doc/markup/code.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/markup/code.rst b/doc/markup/code.rst
index 9dafdb183..936080d6e 100644
--- a/doc/markup/code.rst
+++ b/doc/markup/code.rst
@@ -208,6 +208,22 @@ additional feature that if you leave the value empty, the shown filename will be
exactly the one given as an argument.
+Dedent
+^^^^^^
+
+.. versionadded:: 1.3
+
+A ``dedent`` option can be given to strip a precedence characters from the code
+block. For example::
+
+ .. literalinclude:: example.rb
+ :language: ruby
+ :dedent: 4
+ :lines: 10-15
+
+:rst:dir:`code-block` also supports the ``dedent`` option.
+
+
.. rubric:: Footnotes
.. [1] There is a standard ``.. include`` directive, but it raises errors if the