Fix #1603 :numref: doesn't work correctly when label contain underscore

If label contains underscore, the underscores are replaced with hyphens on normalization.
:numref: confuses the normalization with explicit notation.
This fix uses `target` variable insted of labelid to check the role is explicit or not.
This commit is contained in:
tk0miya
2014-10-27 11:02:54 +09:00
parent b5430045ae
commit 88103c112a
4 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -476,9 +476,9 @@ def test_numfig_disabled(app, status, warning):
"span[@class='caption-number']", None, True),
(".//li/code/span", '^fig1$', True),
(".//li/code/span", '^Figure#$', True),
(".//li/code/span", '^table1$', True),
(".//li/code/span", '^table-1$', True),
(".//li/code/span", '^Table:#$', True),
(".//li/code/span", '^code1$', True),
(".//li/code/span", '^code_1$', True),
(".//li/code/span", '^Code-#$', True),
],
'foo.html': [