summaryrefslogtreecommitdiff
path: root/sphinx/domains/javascript.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-09-27 16:02:52 +0100
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-09-27 16:02:52 +0100
commit51927bb6e416aea4f30b39de28e40b53168b7fed (patch)
tree56b97c9072d48681cc9ac2a9f825898910101bd1 /sphinx/domains/javascript.py
parentf01d50d695bf55f1af34b87c4e6c84f76dd9a36d (diff)
parent7d67371f38210ed328e6249e73ec1e5e607dacd1 (diff)
downloadsphinx-git-51927bb6e416aea4f30b39de28e40b53168b7fed.tar.gz
Merge branch '5.x'
Diffstat (limited to 'sphinx/domains/javascript.py')
-rw-r--r--sphinx/domains/javascript.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/domains/javascript.py b/sphinx/domains/javascript.py
index b77c8dff0..b78dfd30e 100644
--- a/sphinx/domains/javascript.py
+++ b/sphinx/domains/javascript.py
@@ -298,7 +298,7 @@ class JSModule(SphinxDirective):
content_node.document = self.state.document
nested_parse_with_titles(self.state, self.content, content_node)
- ret: List[Node] = [*content_node.children]
+ ret: List[Node] = []
if not noindex:
domain = cast(JavaScriptDomain, self.env.get_domain('js'))
@@ -315,6 +315,7 @@ class JSModule(SphinxDirective):
indextext = _('%s (module)') % mod_name
inode = addnodes.index(entries=[('single', indextext, node_id, '', None)])
ret.append(inode)
+ ret.extend(content_node.children)
return ret
def make_old_id(self, modname: str) -> str: