[PATCH 2/2] docs/sphinx: change default role to "any"

John Snow posted 2 patches 4 years, 6 months ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Thomas Huth <thuth@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Alexander Bulekov <alxndr@bu.edu>, Stefan Hajnoczi <stefanha@redhat.com>, Bandan Das <bsd@redhat.com>
There is a newer version of this series
[PATCH 2/2] docs/sphinx: change default role to "any"
Posted by John Snow 4 years, 6 months ago
This interprets single-backtick syntax in all of our Sphinx docs as a
cross-reference to *something*, including Python symbols. If it doesn't
resolve, or resolves to too more than one thing, Sphinx will emit a
warning and the build will fail.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 docs/conf.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/docs/conf.py b/docs/conf.py
index ff6e92c6e2e..acaf883704a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -85,6 +85,9 @@
 # The master toctree document.
 master_doc = 'index'
 
+# Interpret `this` to be a cross-reference to "anything".
+default_role = 'any'
+
 # General information about the project.
 project = u'QEMU'
 copyright = u'2021, The QEMU Project Developers'
-- 
2.31.1


Re: [PATCH 2/2] docs/sphinx: change default role to "any"
Posted by Eric Blake 4 years, 6 months ago
On Wed, Aug 04, 2021 at 08:48:37PM -0400, John Snow wrote:
> This interprets single-backtick syntax in all of our Sphinx docs as a
> cross-reference to *something*, including Python symbols. If it doesn't
> resolve, or resolves to too more than one thing, Sphinx will emit a

s/too //

> warning and the build will fail.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  docs/conf.py | 3 +++
>  1 file changed, 3 insertions(+)
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org