File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ Dependencies
77Incompatible changes
88--------------------
99
10+ * #9435: linkcheck: Disable checking automatically generated anchors on
11+ github.com (ex. anchors in reST/Markdown documents)
12+
1013Deprecated
1114----------
1215
@@ -16,6 +19,8 @@ Features added
1619Bugs fixed
1720----------
1821
22+ * #9435: linkcheck: Failed to check anchors in github.com
23+
1924Testing
2025--------
2126
Original file line number Diff line number Diff line change @@ -714,7 +714,10 @@ def setup(app: Sphinx) -> Dict[str, Any]:
714714 app .add_event ('linkcheck-process-uri' )
715715
716716 app .connect ('config-inited' , compile_linkcheck_allowed_redirects , priority = 800 )
717- app .connect ('linkcheck-process-uri' , rewrite_github_anchor )
717+
718+ # FIXME: Disable URL rewrite handler for github.com temporarily.
719+ # ref: https://github.com/sphinx-doc/sphinx/issues/9435
720+ # app.connect('linkcheck-process-uri', rewrite_github_anchor)
718721
719722 return {
720723 'version' : 'builtin' ,
Original file line number Diff line number Diff line change @@ -13,8 +13,7 @@ Some additional anchors to exercise ignore code
1313* `Complete nonsense <https://localhost:7777/doesnotexist>`_
1414* `Example valid local file <conf.py>`_
1515* `Example invalid local file <path/to/notfound>`_
16- * https://github.com/sphinx-doc/sphinx#documentation
17- * https://github.com/sphinx-doc/sphinx#user-content-testing
16+ * https://github.com/sphinx-doc/sphinx/blob/4.x/sphinx/__init__.py#L2
1817
1918.. image:: https://www.google.com/image.png
2019.. figure:: https://www.google.com/image2.png
Original file line number Diff line number Diff line change @@ -66,8 +66,8 @@ def test_defaults_json(app):
6666 "info" ]:
6767 assert attr in row
6868
69- assert len (content .splitlines ()) == 12
70- assert len (rows ) == 12
69+ assert len (content .splitlines ()) == 11
70+ assert len (rows ) == 11
7171 # the output order of the rows is not stable
7272 # due to possible variance in network latency
7373 rowsby = {row ["uri" ]: row for row in rows }
@@ -88,7 +88,7 @@ def test_defaults_json(app):
8888 assert dnerow ['uri' ] == 'https://localhost:7777/doesnotexist'
8989 assert rowsby ['https://www.google.com/image2.png' ] == {
9090 'filename' : 'links.txt' ,
91- 'lineno' : 20 ,
91+ 'lineno' : 19 ,
9292 'status' : 'broken' ,
9393 'code' : 0 ,
9494 'uri' : 'https://www.google.com/image2.png' ,
@@ -102,10 +102,6 @@ def test_defaults_json(app):
102102 # images should fail
103103 assert "Not Found for url: https://www.google.com/image.png" in \
104104 rowsby ["https://www.google.com/image.png" ]["info" ]
105- # The anchor of the URI for github.com is automatically modified
106- assert 'https://github.com/sphinx-doc/sphinx#documentation' not in rowsby
107- assert 'https://github.com/sphinx-doc/sphinx#user-content-documentation' in rowsby
108- assert 'https://github.com/sphinx-doc/sphinx#user-content-testing' in rowsby
109105
110106
111107@pytest .mark .sphinx (
You can’t perform that action at this time.
0 commit comments