aboutsummaryrefslogtreecommitdiff
path: root/rust/qemu-api/src
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2025-03-10 23:42:29 -0400
committerMarkus Armbruster <armbru@redhat.com>2025-03-11 10:10:57 +0100
commit707f2bbb7899297884095a76a1237c8dbfce09fd (patch)
treed18c2cb499d5f865b5c809b6e05570f20b12f92c /rust/qemu-api/src
parentd48a8f8de3f2c5609ecd362f1d1c5c1ba60161fc (diff)
downloadqemu-707f2bbb7899297884095a76a1237c8dbfce09fd.zip
qemu-707f2bbb7899297884095a76a1237c8dbfce09fd.tar.gz
qemu-707f2bbb7899297884095a76a1237c8dbfce09fd.tar.bz2
docs/qapi-domain: Fix error context reporting in Sphinx 5.x and 6.x
Sphinx 5.3.0 to Sphinx 6.2.0 has a bug where nested content in an ObjectDescription content block has its error position reported incorrectly due to an oversight when they added nested section support to this directive. (This bug is present in Sphinx's own Python and C domains; test it yourself by creating a py:func directive and creating a syntax error in the directive's content block. The reporting will be incorrect.) To avoid overriding and re-implementing the entirety of the run() method, a workaround is employed where we parse the content block ourselves in before_content(), then null the content block to make Sphinx's own parsing a no-op. Then, in transform_content (which occurs after Sphinx's nested parse), we simply swap our own parsed content tree back in for Sphinx's. It appears a little tricky, but it's the nicest solution I can find. Signed-off-by: John Snow <jsnow@redhat.com> Message-ID: <20250311034303.75779-32-jsnow@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'rust/qemu-api/src')
0 files changed, 0 insertions, 0 deletions