mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
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:
@@ -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': [
|
||||
|
||||
Reference in New Issue
Block a user