Skip to content

Commit

Permalink
Fix :noindex: for PyModule and JSModule``
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Aug 17, 2023
1 parent b2fc47f commit e47846a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Bugs fixed
which several extensions relied upon.
* Fixed a type error in ``SingleFileHTMLBuilder._get_local_toctree``,
``includehidden`` may be passed as a string or a boolean.
* Fix ``:noindex:`` for ``PyModule`` and JSModule``.

Release 7.2.1 (released Aug 17, 2023)
=====================================
Expand Down
2 changes: 1 addition & 1 deletion sphinx/domains/javascript.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class JSModule(SphinxDirective):
def run(self) -> list[Node]:
mod_name = self.arguments[0].strip()
self.env.ref_context['js:module'] = mod_name
no_index = 'no-index' in self.options
no_index = 'no-index' in self.options or 'noindex' in self.options

content_node: Element = nodes.section()
# necessary so that the child nodes get the right source/line set
Expand Down
2 changes: 1 addition & 1 deletion sphinx/domains/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ def run(self) -> list[Node]:
domain = cast(PythonDomain, self.env.get_domain('py'))

modname = self.arguments[0].strip()
no_index = 'no-index' in self.options
no_index = 'no-index' in self.options or 'noindex' in self.options
self.env.ref_context['py:module'] = modname

content_node: Element = nodes.section()
Expand Down

0 comments on commit e47846a

Please sign in to comment.