Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
f857b639
Commit
f857b639
authored
Jul 16, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warning with Sphinx 1.4
parent
cbd72da9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
doc/_exts/sphinxcontrib/rubydomain.py
doc/_exts/sphinxcontrib/rubydomain.py
+13
-4
No files found.
doc/_exts/sphinxcontrib/rubydomain.py
View file @
f857b639
...
...
@@ -15,6 +15,7 @@ from docutils import nodes
from
docutils.parsers.rst
import
directives
from
sphinx
import
addnodes
from
sphinx
import
version_info
from
sphinx.roles
import
XRefRole
from
sphinx.locale
import
l_
,
_
from
sphinx.domains
import
Domain
,
ObjType
,
Index
...
...
@@ -231,8 +232,8 @@ class RubyObject(ObjectDescription):
indextext
=
self
.
get_index_text
(
modname
,
name_cls
)
if
indextext
:
self
.
indexnode
[
'entries'
].
append
(
(
'single'
,
indextext
,
fullname
,
fullname
))
self
.
indexnode
[
'entries'
].
append
(
_make_index
(
'single'
,
indextext
,
fullname
,
fullname
))
def
before_content
(
self
):
# needed for automatic qualification of members (reset in subclasses)
...
...
@@ -415,11 +416,19 @@ class RubyModule(Directive):
# modindex currently
if
not
noindex
:
indextext
=
_
(
'%s (module)'
)
%
modname
inode
=
addnodes
.
index
(
entries
=
[
(
'single'
,
indextext
,
'module-'
+
modname
,
modname
)])
inode
=
addnodes
.
index
(
entries
=
[
_make_index
(
'single'
,
indextext
,
'module-'
+
modname
,
modname
)])
ret
.
append
(
inode
)
return
ret
def
_make_index
(
entrytype
,
entryname
,
target
,
ignored
,
key
=
None
):
# Sphinx 1.4 introduced backward incompatible changes, it now
# requires 5 tuples. Last one is categorization key. See
# http://www.sphinx-doc.org/en/stable/extdev/nodes.html#sphinx.addnodes.index
if
version_info
>=
(
1
,
4
,
0
,
''
,
0
):
return
(
entrytype
,
entryname
,
target
,
ignored
,
key
)
else
:
return
(
entrytype
,
entryname
,
target
,
ignored
)
class
RubyCurrentModule
(
Directive
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment