Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita1711ef

Browse files
gh-97740: Fix bang in Sphinx C domain ref target syntax (GH-97741)
*gh-97740: Fix bang in Sphinx C domain ref target syntaxCo-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>* Add NEWS entry for C domain bang fixCo-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>(cherry picked from commit9148c0d)Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
1 parentc2d3f73 commita1711ef

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

‎Doc/conf.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,18 @@
244244
# bpo-40204: Disable warnings on Sphinx 2 syntax of the C domain since the
245245
# documentation is built with -W (warnings treated as errors).
246246
c_warn_on_allowed_pre_v3=False
247+
248+
# Fix '!' not working with C domain when pre_v3 is enabled
249+
importsphinx
250+
251+
ifsphinx.version_info[:2]< (5,3):
252+
fromsphinx.domains.cimportCXRefRole
253+
254+
original_run=CXRefRole.run
255+
256+
defnew_run(self):
257+
ifself.disabled:
258+
returnsuper(CXRefRole,self).run()
259+
returnoriginal_run(self)
260+
261+
CXRefRole.run=new_run
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix ``!`` in c domain ref target syntax via a ``conf.py`` patch, so it works
2+
as intended to disable ref target resolution.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp