mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #1718. :numref: does not work with capital letters in the label
This commit is contained in:
parent
95d6c68371
commit
62e0490b81
1
CHANGES
1
CHANGES
@ -39,6 +39,7 @@ Bugs fixed
|
||||
(iPhone5s safari).
|
||||
* #1722: restore ``toctree()`` template function behavior that was changed at 1.3b1.
|
||||
* #1732: i18n: localized table caption raises exception.
|
||||
* #1718: ``:numref:`` does not work with capital letters in the label
|
||||
|
||||
|
||||
Release 1.3b2 (released Dec 5, 2014)
|
||||
|
@ -636,7 +636,7 @@ class StandardDomain(Domain):
|
||||
return None
|
||||
|
||||
title = contnode.astext()
|
||||
if target == title:
|
||||
if target == title.lower():
|
||||
prefix = env.config.numfig_format.get(figtype, '')
|
||||
title = prefix.replace('%s', '#')
|
||||
newtitle = prefix % '.'.join(map(str, fignumber))
|
||||
|
@ -14,7 +14,7 @@ Baz A
|
||||
|
||||
hello,world
|
||||
|
||||
.. _code22:
|
||||
.. _CODE22:
|
||||
|
||||
.. code-block:: python
|
||||
:caption: should be List 2.2
|
||||
|
@ -29,7 +29,7 @@ test-tocdepth
|
||||
|
||||
hello,world
|
||||
|
||||
.. _code_1:
|
||||
.. _CODE_1:
|
||||
|
||||
.. code-block:: python
|
||||
:caption: should be List 1
|
||||
@ -46,5 +46,5 @@ test-tocdepth
|
||||
* Fig.2.2 is :numref:`Figure# <fig22>`
|
||||
* Table.1 is :numref:`table-1`
|
||||
* Table.2.2 is :numref:`Table:# <table22>`
|
||||
* List.1 is :numref:`code_1`
|
||||
* List.2.2 is :numref:`Code-# <code22>`
|
||||
* List.1 is :numref:`CODE_1`
|
||||
* List.2.2 is :numref:`Code-# <CODE22>`
|
||||
|
@ -492,7 +492,7 @@ def test_numfig_disabled(app, status, warning):
|
||||
(".//li/code/span", '^Figure#$', True),
|
||||
(".//li/code/span", '^table-1$', True),
|
||||
(".//li/code/span", '^Table:#$', True),
|
||||
(".//li/code/span", '^code_1$', True),
|
||||
(".//li/code/span", '^CODE_1$', True),
|
||||
(".//li/code/span", '^Code-#$', True),
|
||||
],
|
||||
'foo.html': [
|
||||
|
Loading…
Reference in New Issue
Block a user