diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-01-11 19:54:55 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-01-25 11:12:41 +0300 |
commit | 2e22e96061bb319d04f6c315352b525b0cd598a0 (patch) | |
tree | f5172d2774e209af136557d1a71eb752c0df4dd9 /sphinx/directives | |
parent | f8fc6075ba317ba694ae4df5227a5358a08df6e3 (diff) |
Add new event: :event:`object-description-transform`
Diffstat (limited to 'sphinx/directives')
-rw-r--r-- | sphinx/directives/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sphinx/directives/__init__.py b/sphinx/directives/__init__.py index 09390a6df..9a2fb4412 100644 --- a/sphinx/directives/__init__.py +++ b/sphinx/directives/__init__.py @@ -193,6 +193,8 @@ class ObjectDescription(SphinxDirective): self.env.temp_data['object'] = self.names[0] self.before_content() self.state.nested_parse(self.content, self.content_offset, contentnode) + self.env.app.emit('object-description-transform', + self.domain, self.objtype, contentnode) DocFieldTransformer(self).transform_all(contentnode) self.env.temp_data['object'] = None self.after_content() @@ -295,6 +297,8 @@ def setup(app: "Sphinx") -> Dict[str, Any]: # new, more consistent, name directives.register_directive('object', ObjectDescription) + app.add_event('object-description-transform') + return { 'version': 'builtin', 'parallel_read_safe': True, |