John Snow <js...@redhat.com> writes: > Instead of using the info object for the doc block as a whole (which > always points to the very first line of the block), update the info > pointer for each call to ensure_untagged_section when the existing > section is otherwise empty. This way, Sphinx error information will > match precisely to where the text actually starts. > > For example, this patch will move the info pointer for the "Hello!" > untagged section ... > >> ## <-- from here ... >> # Hello! <-- ... to here. >> ## > > Signed-off-by: John Snow <js...@redhat.com>
This patch would be easier to accept with a test case where it improves the error location. I tried to construct one quickly, but failed. Can you help?