Skip to content

Commit

Permalink
Close sphinx-doc#7144: Add CSS class indicating its domain for each d…
Browse files Browse the repository at this point in the history
…esc node
  • Loading branch information
tk0miya committed Feb 13, 2020
1 parent d1a24a3 commit 1bc56f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Features added
* #3077: Implement the scoping for :rst:dir:`productionlist` as indicated
in the documentation.
* #1027: Support backslash line continuation in :rst:dir:`productionlist`.
* #7144: Add CSS class indicating its domain for each desc node

Bugs fixed
----------
Expand Down
2 changes: 2 additions & 0 deletions sphinx/directives/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ def run(self) -> List[Node]:
# 'desctype' is a backwards compatible attribute
node['objtype'] = node['desctype'] = self.objtype
node['noindex'] = noindex = ('noindex' in self.options)
if self.domain:
node['classes'].append(self.domain)

self.names = [] # type: List[Any]
signatures = self.get_signatures()
Expand Down

0 comments on commit 1bc56f9

Please sign in to comment.