summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-09-19 13:18:29 +0200
committerGeorg Brandl <georg@python.org>2014-09-19 13:18:29 +0200
commit3386f214af05e8cc880fde177d17ca0a91cfbe27 (patch)
tree4116dc9b0da3711a98f7b7d118ecd2d488c3ba7b /doc
parent6a5f1407d6f338f2d200ef013117f0d995c787cd (diff)
downloadsphinx-3386f214af05e8cc880fde177d17ca0a91cfbe27.tar.gz
Use "any" role in changelog.
Diffstat (limited to 'doc')
-rw-r--r--doc/changes.rst2
-rw-r--r--doc/markup/code.rst22
2 files changed, 17 insertions, 7 deletions
diff --git a/doc/changes.rst b/doc/changes.rst
index d5927a72..e4263687 100644
--- a/doc/changes.rst
+++ b/doc/changes.rst
@@ -1,5 +1,7 @@
:tocdepth: 2
+.. default-role:: any
+
.. _changes:
Changes in Sphinx
diff --git a/doc/markup/code.rst b/doc/markup/code.rst
index f69bb161..b948dc38 100644
--- a/doc/markup/code.rst
+++ b/doc/markup/code.rst
@@ -36,21 +36,29 @@ installed) and handled in a smart way:
highlighted as Python).
* The highlighting language can be changed using the ``highlight`` directive,
- used as follows::
+ used as follows:
- .. highlight:: c
+ .. rst:directive:: .. highlight:: language
- This language is used until the next ``highlight`` directive is encountered.
+ Example::
+
+ .. highlight:: c
+
+ This language is used until the next ``highlight`` directive is encountered.
* For documents that have to show snippets in different languages, there's also
a :rst:dir:`code-block` directive that is given the highlighting language
- directly::
+ directly:
+
+ .. rst:directive:: .. code-block:: language
+
+ Use it like this::
- .. code-block:: ruby
+ .. code-block:: ruby
- Some Ruby code.
+ Some Ruby code.
- The directive's alias name :rst:dir:`sourcecode` works as well.
+ The directive's alias name :rst:dir:`sourcecode` works as well.
* The valid values for the highlighting language are: