mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
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>
(cherry picked from commit dbfabcc0c3
)
Co-authored-by: Jules Lasne <jules.lasne@gmail.com>
This commit is contained in:
parent
4f9eb3f3d3
commit
ff887f38f6
1 changed files with 1 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue