diff options
author | Jules Lasne <jules.lasne@gmail.com> | 2021-03-01 22:59:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 22:59:58 +0100 |
commit | dbfabcc0c306742e34b9b0e162c63ccebe9d2b05 (patch) | |
tree | 3a06d7a07ef8841d6af7c89e0a23529be1b76975 | |
parent | 7c255082634e3951a434264aeacf6b3f4b029647 (diff) | |
download | cpython-git-dbfabcc0c306742e34b9b0e162c63ccebe9d2b05.tar.gz |
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>
-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 28994399e2..bcd9d26b36 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: |