mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Update :dedent: example
The presence or absence of the ``:dedent: 4`` option in the example
.. code-block:: ruby
:dedent: 4
some ruby code
makes no difference for the output due to how ReST handles whitespace.
If it is present, then ReST indent is 3 and the 4 spaces of the code are
stripped by the :dedent: option. If the dedent option is missing, then
the ReST indent is 7 and all whitespace is stripped again.
Add a dummy option to fixate the ReST indent to 3, so adding and
removing of the option in the example has an effect on the output.
This commit is contained in:
@@ -598,6 +598,7 @@ __ https://pygments.org/docs/lexers
|
||||
are removed via :func:`textwrap.dedent()`. For example::
|
||||
|
||||
.. code-block:: ruby
|
||||
:linenos:
|
||||
:dedent: 4
|
||||
|
||||
some ruby code
|
||||
|
||||
Reference in New Issue
Block a user