From ff887f38f6bb438bac3a4b02aaac1d56c6077418 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:23:21 -0800 Subject: Fixed linenumber missing when audit hook has an error (GH-24692) See https://github.com/sphinx-doc/sphinx/issues/8932 Co-authored-by: tk0miya (cherry picked from commit dbfabcc0c306742e34b9b0e162c63ccebe9d2b05) Co-authored-by: Jules Lasne --- Doc/tools/extensions/pyspecific.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py index 2fad9ec..74de6ff 100644 --- a/Doc/tools/extensions/pyspecific.py +++ b/Doc/tools/extensions/pyspecific.py @@ -191,6 +191,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: -- cgit v0.12