mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix Emit wrong warnings if citation label includes hyphens (refs: #3558)
This commit is contained in:
@@ -23,6 +23,7 @@ citation
|
||||
--------------------
|
||||
|
||||
[bar]_
|
||||
[baz_qux]_
|
||||
|
||||
footnotes in table
|
||||
--------------------
|
||||
@@ -50,6 +51,8 @@ footenotes
|
||||
|
||||
.. [bar] cite
|
||||
|
||||
.. [baz_qux] citation including underscore
|
||||
|
||||
.. [#] footnote in table caption
|
||||
|
||||
.. [#] footnote in table header
|
||||
|
||||
@@ -422,19 +422,21 @@ def test_static_output(app):
|
||||
(".//li/a", "double"),
|
||||
],
|
||||
'footnote.html': [
|
||||
(".//a[@class='footnote-reference'][@href='#id8'][@id='id1']", r"\[1\]"),
|
||||
(".//a[@class='footnote-reference'][@href='#id9'][@id='id2']", r"\[2\]"),
|
||||
(".//a[@class='footnote-reference'][@href='#id9'][@id='id1']", r"\[1\]"),
|
||||
(".//a[@class='footnote-reference'][@href='#id10'][@id='id2']", r"\[2\]"),
|
||||
(".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"),
|
||||
(".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"),
|
||||
(".//a[@class='footnote-reference'][@href='#id10'][@id='id5']", r"\[4\]"),
|
||||
(".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[5\]"),
|
||||
(".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"),
|
||||
(".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[4\]"),
|
||||
(".//a[@class='footnote-reference'][@href='#id12'][@id='id7']", r"\[5\]"),
|
||||
(".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"),
|
||||
(".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"),
|
||||
(".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"),
|
||||
(".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"),
|
||||
(".//a[@class='fn-backref'][@href='#id5']", r"\[4\]"),
|
||||
(".//a[@class='fn-backref'][@href='#id6']", r"\[5\]"),
|
||||
(".//a[@class='fn-backref'][@href='#id7']", r"\[6\]"),
|
||||
(".//a[@class='fn-backref'][@href='#id5']", r"\[baz_qux\]"),
|
||||
(".//a[@class='fn-backref'][@href='#id6']", r"\[4\]"),
|
||||
(".//a[@class='fn-backref'][@href='#id7']", r"\[5\]"),
|
||||
(".//a[@class='fn-backref'][@href='#id8']", r"\[6\]"),
|
||||
],
|
||||
'otherext.html': [
|
||||
(".//h1", "Generated section"),
|
||||
|
||||
@@ -297,19 +297,21 @@ def cached_etree_parse():
|
||||
(".//li/a", "double"),
|
||||
],
|
||||
'footnote.html': [
|
||||
(".//a[@class='footnote-reference brackets'][@href='#id8'][@id='id1']", r"1"),
|
||||
(".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id2']", r"2"),
|
||||
(".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"),
|
||||
(".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"),
|
||||
(".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"),
|
||||
(".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"),
|
||||
(".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id5']", r"4"),
|
||||
(".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"5"),
|
||||
(".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']", r"\[baz_qux\]"),
|
||||
(".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"),
|
||||
(".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"),
|
||||
(".//a[@class='fn-backref'][@href='#id1']", r"1"),
|
||||
(".//a[@class='fn-backref'][@href='#id2']", r"2"),
|
||||
(".//a[@class='fn-backref'][@href='#id3']", r"3"),
|
||||
(".//a[@class='fn-backref'][@href='#id4']", r"bar"),
|
||||
(".//a[@class='fn-backref'][@href='#id5']", r"4"),
|
||||
(".//a[@class='fn-backref'][@href='#id6']", r"5"),
|
||||
(".//a[@class='fn-backref'][@href='#id7']", r"6"),
|
||||
(".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"),
|
||||
(".//a[@class='fn-backref'][@href='#id6']", r"4"),
|
||||
(".//a[@class='fn-backref'][@href='#id7']", r"5"),
|
||||
(".//a[@class='fn-backref'][@href='#id8']", r"6"),
|
||||
],
|
||||
'otherext.html': [
|
||||
(".//h1", "Generated section"),
|
||||
|
||||
Reference in New Issue
Block a user