diff options
author | Jules Lasne <jules.lasne@gmail.com> | 2021-03-01 21:59:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 21:59:58 (GMT) |
commit | dbfabcc0c306742e34b9b0e162c63ccebe9d2b05 (patch) | |
tree | 3a06d7a07ef8841d6af7c89e0a23529be1b76975 /Doc/tools | |
parent | 7c255082634e3951a434264aeacf6b3f4b029647 (diff) | |
download | cpython-dbfabcc0c306742e34b9b0e162c63ccebe9d2b05.zip cpython-dbfabcc0c306742e34b9b0e162c63ccebe9d2b05.tar.gz cpython-dbfabcc0c306742e34b9b0e162c63ccebe9d2b05.tar.bz2 |
Fixed linenumber missing when audit hook has an error (GH-24692)
See https://github.com/sphinx-doc/sphinx/issues/8932
Co-authored-by: tk0miya <i.tkomiya@gmail.com>
Diffstat (limited to 'Doc/tools')
-rw-r--r-- | Doc/tools/extensions/pyspecific.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py index 2899439..bcd9d26 100644 --- a/Doc/tools/extensions/pyspecific.py +++ b/Doc/tools/extensions/pyspecific.py @@ -224,6 +224,7 @@ class AuditEvent(Directive): info['source'].append((env.docname, target)) pnode = nodes.paragraph(text, classes=["audit-hook"], ids=ids) + pnode.line = self.lineno if self.content: self.state.nested_parse(self.content, self.content_offset, pnode) else: |