aboutsummaryrefslogtreecommitdiff
path: root/docs/sphinx/compat.py
AgeCommit message (Collapse)AuthorFilesLines
2025-03-11docs/qapi-domain: add XREF compatibility goop for Sphinx < 4.1John Snow1-6/+130
Sphinx < 4.1 handles cross-references ... differently. Factor out and isolate the compatibility goop we need to make cross references work properly in old versions of Sphinx. Yes, it's ugly. Yes, it works. No, I don't want to talk about it. Understand that this patch exists because of the overflowing love in my heart. Signed-off-by: John Snow <jsnow@redhat.com> Message-ID: <20250311034303.75779-30-jsnow@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2025-03-11docs/qapi-domain: add compatibility node classesJohn Snow1-1/+16
Sphinx prior to v4.0 uses different classes for rendering elements of documentation objects; add some compatibility classes to use the right node classes conditionally. Signed-off-by: John Snow <jsnow@redhat.com> Message-ID: <20250311034303.75779-10-jsnow@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2025-03-11docs/sphinx: add compat.py module and nested_parse helperJohn Snow1-0/+35
Create a compat module that handles sphinx cross-version compatibility issues. For the inaugural function, add a nested_parse_with_titles() helper that handles differences in line number tracking for nested directive body parsing. Spoilers: there are more cross-version hacks to come throughout the series. Signed-off-by: John Snow <jsnow@redhat.com> Message-ID: <20250311034303.75779-5-jsnow@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>