mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +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>
This commit is contained in:
parent
7c25508263
commit
dbfabcc0c3
1 changed files with 1 additions and 0 deletions
|
@ -224,6 +224,7 @@ class AuditEvent(Directive):
|
||||||
info['source'].append((env.docname, target))
|
info['source'].append((env.docname, target))
|
||||||
|
|
||||||
pnode = nodes.paragraph(text, classes=["audit-hook"], ids=ids)
|
pnode = nodes.paragraph(text, classes=["audit-hook"], ids=ids)
|
||||||
|
pnode.line = self.lineno
|
||||||
if self.content:
|
if self.content:
|
||||||
self.state.nested_parse(self.content, self.content_offset, pnode)
|
self.state.nested_parse(self.content, self.content_offset, pnode)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue