merge heads

This commit is contained in:
Georg Brandl 2014-09-23 07:51:52 +02:00
commit 986aba2a43
3 changed files with 11 additions and 0 deletions

View File

@ -81,6 +81,8 @@ Features added
the order of documents before they are read by the environment.
* #1284: Program options documented with :rst:dir:`option` can now start with
``+``.
* PR#291: The caption of :rst:dir:`code-block` is recognised as a title of ref
target. Thanks to Takeshi Komiya.
Bugs fixed
----------

View File

@ -562,6 +562,11 @@ class StandardDomain(Domain):
break
else:
continue
elif node.tagname == 'literal_block':
if 'caption' in node:
sectname = node['caption']
else:
continue
else:
# anonymous-only labels
continue

View File

@ -142,6 +142,7 @@ Adding \n to test unescaping.
* :ref:`here <some-label>`
* :ref:`my-figure`
* :ref:`my-table`
* :ref:`my-code-block`
* :doc:`subdir/includes`
* ``:download:`` is tested in includes.txt
* :option:`Python -c option <python -c>`
@ -228,8 +229,11 @@ Version markup
Code blocks
-----------
.. _my-code-block:
.. code-block:: ruby
:linenos:
:caption: my ruby code
def ruby?
false